iOS - Realm for react-native ,unkonw execution context, - ios

it show 'unkonw execution context' when I
import Realm from 'realm';
The same problem -> the link
how to solve it in xcode and why .

Please ensure you're using the installation/setup steps for React Native that can be found here. If you're still experiencing problems after following those steps (and I recommend trying again to see if it had to do with that project), try reinstalling React Native.
Let me know if you have any issues with this and I'll happily work with you to resolve the issue and edit my answer. Cheers!

update the react-native over 0.43 if use the newest realm.
By the way, you should update your cocoapod over 1.2.0 best that version 1.1 will link project wrong.

Related

React Native + ARKit = "React/RCTConvert.h not found"

I am trying to use React Native with ARKit for the first time and I ran into a problem.
What I did:
(in Terminal)
react-native init myApp
cd myApp
npm install --save react-native-arkit
react-native link react-native-arkit
(in XCode)
Open myApp workspace under myApp/ios
Assign my Team
Trying to Build on a device
What I got:
React/RCTConvert.h' file not found
in color-grabber.m
I found a lot of references to the same problem online (dating back to 2017+), none of the fixes they offered seemed to work for me.
Truly appreciate any help!
Just want to provide an update if anyone is interested.
After a long array of manual updates to the settings I managed to fix most of the issues. However, given that the package is not supported, I gave up on it.
The way to go seems Viro React which is now open source and is pretty actively supported. Unfortunately, it is not suitable for my purposes (I need a very small footprint), so I will try using iOS native components instead.

Skipped installing .framework binary due to the error

I'm using Carthage and getting this error with a dependency or two:
Skipped installing mixpanel-swift.framework binary due to the error: "Incompatible Swift version - framework was built with 3.1 and the local version is 4.0."
I understand generally what Carthage is seeing as the problem, but I haven't found a satisfactory answer on my own or looking through other issues posted that feels as clean or solid as I'm assuming it should be.
I've seen carthage bootstrap --platform iOS --no-use-binaries as a potential solution, but I can't tell if thats solving the actual problem I'm having or not, or if it is the best solution long term?
Any help on a solution or guiding me to my way there? Thanks!
To solve this you need to use the Swift 4 version of Mixpanel. It is failing because the code you are getting from Github is for Swift 3. On their Github page they say you should use the Swift 4 branch - Mixpanel Swift 4 branch. I think your Cart file needs to use: github "mixpanel/mixpanel-swift" "swift4"

XCode - Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1

Lately I've started to take up a course for learning swift to devolp iOS OS X and Watch OS apps. I'm taking this course on udacity. The first step is to download a project and put it in a folder on your desktop. I had to open the app and then run it, which should've worked. But not for me somehow. I hit run and the following error showed up (this is the complete error log):
Some poeple suggested that I should update my XCode but I already have. I currently have XCode 7.3! I'm quite new to this platform, that's also why I'm doing this course, so I don't really know what I have to do. Can someone please tell me what's going on here?
This is the result of a corrupted swift class. If you encounter a class looking similar to the following code:
Ôæ≠fiÔæ≠fiqcaJÔæ≠fihJ0ç硡ˇ2ç硡ˇ$5y$ġˇˇ% 7.ġˇˇÔæ≠fiÔæ≠fiP‚—ġˇˇfl‚ġˇˇ ˗ġˇˇ∞B‚ġˇˇÄ+€
Try to re-create the class or re-download it. This solved my problem and to me, it would look like the only solution possible for a corrupted class.
Delete derived data.
Windows->Projects->select your project and delete derived data
This worked for me for couple of projects which i downloaded from internet.
I do everything restarts Xcode, rebuild Project, adding toolChains lock unlock them,
so there are two possibilities
first, maybe you install the beta version of Xcode
or try this, this work for me->
I tried to run a project in Xcode12/Swift4, while the project was written on Xcode8/Swift3
so I install Xcode version 11.7 and run this work for me.
if you not done with 11.7 then install another version of Xcode and try the appreciated version
May this help you

Why do I get a lot of errors while adding Alamofire framework?

I try to add Alamofire framework for IOS using cocoapods and adding it directly to the project. I get a lot of compiler errors in both cases though I follow all the guides.
Perhaps somebody can help me?
What version of Xcode and Alamofire are you using?
I can see an error there for Do-While which was removed in Swift 2.0
I guess you need to Upgrade to Xcode 7. Then follow again the steps from Alamofire Readme Page on Github.
I personally prefer CocoaPod to add frameworks.

Cordova deprecated when using Ionic Framework for SocialSharing ng-Cordova plugin

When I run my app in xcode, it advises me there are 2 errors:
"dataFromBase64String:base64content" is deprecated
suggests added cdv to create "cdv_dataFromBase64String:base64content"
The error in the browser console is clearly:
Cannot read property 'socialsharing' of undefined.
Not sure if this is a fix I can go in and manually do somehow? Or if I need to abandon this plugin.
Direction or advise would be greatly appreciated. Or alternative plugins that work natively to use with Ionic.

Resources