Library not loaded: '#rpath/OneSignalCore.framework/OneSignalCore' - Thread 1: signal SIGABRT - xcode

Xcode Version: 14.2
Device: Iphone 6S
React Native Version: 0.69.6
When I try to upload my react native project to my ios device, I get this error

The solution I got is really very weird and it just came out while trying and was able to resolve this issue for me. So if anyone here is getting the same error can try this.
Steps
Open Xcode -> Select your app in the Targets -> Go to General Tab -> Frameworks, Libraries and Embedded Content.
Click on + . Search for OneSignal in it and add OneSignal.xcframework.
Here comes the weird part.
After OneSignal.xcframework is added. Just remove this OneSignal.xcframework by selecting and clicking -.
Now just build your app again. Your app should run now.
!!! IMPORTANT !!!
If doesn't work try with OneSignalCode

First I added "OneSignalCore.xcframework" to the library, then I pressed the run button. It gave an error again and said that it could not find "OneSignalOutcomes.xcframework". So I added it to the library and it worked as a result.

Related

Are m1 macs able to run watch apps?

I have an m1 mac. And I’m trying to create a watch target for my iOS app. After numerous tries, I’ve not been able to run to any watch (either real or simulator).
I also downloaded open source watchOS projects and couldn’t run any of them. I get the error “Could not attach to pid: 18362” “attach failed ((os/kern) invalid argument)
Has anybody faced this challenge? How did they fix it? Is it caused by the m1, cos I was able to create it on another Mac
Found out the hard way.
As of March 2021, the new Mac M1s cannot run WatchKit apps and CarPlay apps. You either end up with the error in the question or another error.
But these errors do not pop up on regular macs.
For building I enable rosetta, otherwise build process fails.
Then if you to launch the build on watch it debugger fails to attach to debugger (same error as above).
Then go and disable Rosetta and then launch watch build once again. It works. Hopefully it helps
Had a similar issue with playground / xcode projects.
When opening the playground the issue appears like this
The Solution for me was to activate the "Rosetta Mode" when having a xcode project and deactivate the "Rosetta Mode" when using the playground.
You can activate / deactivate it by searching for Xcode in your finder (cmd+space, type "Xcode" scroll below and found it) do a right click an click on "Get info" and in the "General" tab you use the "Open using Rosetta" -button.
Maybe this is also a solution for your problem.
Try to uncheck the open with rosetta option for xcode. For me it was working perfectly in my m1 mac book air.

How can I see console.log in xcode for a release build for React Native

I would like to see some console.log in a release build for a React Native iOS project. I have searched around but haven't found anything and I'm not familiar with xcode. Does anyone know how to do this?
You can use the device console, you get from Xcode -> Devices and Simulators - > Select your device -> open console

ReactNative application runs fine in Xcode 7.0.1 but the same application making issues with Xcode 8.1?

Implemented ReactNative application for iOS integrated with Salesforce in Xcode 7.0.1, it was working fine, now getting issues trying to run the same application in Xcode 8.1 at /Library/Developer/Xcode/DerivedData/Build/Products/Debug-iphonesimulator/ file not found or invalid or not compatible. codesign failed with exit code 1.
Thanks in advance, please help me out on this if you have any idea?
First: Did you clean your project before relaunching it with a new version of XCode?
Secondly: I think this is just an error raised by some "cached data" from the previous XCode. Delete the "build" folder from youApp/ios/
If it still doesn't work, you can edit your project settings by going to *File > Project Settings > Advanced * and setting product & Intermediates path.

Error running playground. Unable to find suitable target device

I downloaded the Swift languages's GuidedTour.playground.zip file from
https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/GuidedTour.html
Unzip it as GuidedTour.playground,
open it in Xcode 6.1.1, then the error message:
Error running playground.
Unable to find suitable target device.
I click OK button to close the error message window,
get back to the playground with the title "A Swift Tour". There is no output for any of the embedded code there. And every time I try to edit any of the code, the error message will pop up again and again.
Some people on the web had the same problem and solved it by adding some devices under the menu Window -> Devices -> SIMULATORS. I did it, but the error keeps showing.
If I click File -> New -> Playground to create a testing playground, this error message will not appear, and the testing code will run.
A week ago, I had replaced the HDD in my Early 2008 iMac with a SSD (solid state disk), recovered the whole system to the SSD from my Time Machine backup. Everything looks good until I found out that Xcode begins to refuse to run the tutorial "A Swift Tour". Before the SSD replacement, Xcode would run it. This might be related?
Thanks a lot for Raptor's kind response. I have solved this problem. I found out that I just added not enough simulators so that Xcode was unable to find suitable target device. After I added all the 10 simulators for iOS 8.1, the error is gone and the output appears.
At first, it seems that I will have to add all of them to make it work. Then after quite a few experiments by removing and adding some back and forth and restarting xcode, I cannot make sure exactly how many simulators are needed. Maybe 3 or 4.
playgrounds will run fine, assuming at least one of the following simulators are configured: iPhone 6, iPhone 6+, iPad Air, resizable iPhone, or resizable iPad.
Delete the contents of ~/Library/Developer/XCPGDevices (typically it contains a directory with a name which is the UDID of the simulated device)
At Xcode 7:
Step 1: Window > Devices > bottom left corner plus icon > add iPad Air or iPad Air 2.
Step 2: Quit and restart Xcode.
I am using Xcode Version 6.0.1. I reboot Mac (only restart Xcode didn't help) and this issue is resolved.
Hope this helps.

Xcode 5 - "iOS Simulator failed to install application" every time I switch simulators

Using Xcode 5 GM, anytime I switch to the 5.1, 6.0 or 6.1 simulators to test, I get the error "iOS Simulator failed to install application." When I reset the simulator it works, but this is getting very tiring.
Anybody have a permanent fix or workaround?
Looks like this is a known issue. From the Xcode 5 release notes:
After switching the minimum deployment target of an application from
iOS 7.0 to a release prior to iOS 7.0, building and running the
application may fail with the message “iOS Simulator failed to install
the application.”
Go to the iOS home screen, click and hold the application icon, then tap the hovering “X” button to delete the application. 13917023
Another release note:
iOS Simulator
If an iOS app is detached, relaunching the same app from Xcode will
result in a black screen in the Simulator even though the new app is
launched. Terminate the app in the Simulator or relaunch it for the
second time. 14648784
Delete the old version app in your simulator (usually iOS 6.x).
Alternatively, header over to iOS Simulator - Reset Content and Settings.
This can be easier when you have a lot of apps on the simulator and can't remember which one you're currently working on.
You need to do this for every iOS Simulator version that causes the problem.
None of the other suggestions worked for me. However, after comparing my existing app settings to a new vanilla project, I noticed that the "Build" field for my Target was blank. Once I put something in that field, the app installed just fine!
if you have already developed project and you used xib to develop views then
X-Code > Inspector Selector Bar > Interface Builder Document > opens in > and change from Xcode Default(5.o) to Xcode 4.6 .
Build and Run your app it will run successfully, if it won't run again then, header over to iOS Simulator - Reset Content and Settings. delete old app from simulator then Run again.
i got the same problem but solved by following way....
Launch the iOS Simulator
Go and click "iOS Simulator" menu
Click "Reset content and settings"
Close simulator and rebuild your app.
Above screen shot is showing the way how you can do this...
I think this works for you...!!!
Deleting the app in the simulator works for me.
just wanted to add that this happen only if I open xib that created in xcode 4.6
If it's other files, this not happen
try this ....
in my case nothing have worked for me , after resetting the content simulator also , i am not able to install the app on simulator . after that i just changed my project location . i just moved the project to other location . then it installed successfully.
None of the above things worked for me. I just reinstalled xcode and it worked.
Ran into this issue today. Found it was an empty Reference Folder (blue folder) causing this. Removed the folder from Resources in Build Phase... cleaned build folder for the heck of it, and it went away.
/Users/YOURUSERNAME/Library/Developer/Xcode/ --> remove all contents of this folder, then simply launch the app from Xcode.
To check your Executable file settng ex.$(EXECUTABLE_NAME)
(Project setting - info property page)
I have different issue when getting error message “iOS Simulator failed to install application”, the reason is because I have added a property in App-Info.plist without any value. For instance, [Application Category] with no value. Thus the error will show up as well.
When I got this error, the image of the phone actually appeared, but the image of the app I wanted to test did not. Instead, I was on the main page of the phone that shows the apps you have. I fixed this problem by deleting the many icons that appeared on the start screens - about 30 of them. These had been created when I testing apps over the months. So, not saying its a solution, but it started working after I deleted the old app images.
For me it was -framework XCTest.
It made the app die with iOS Simulator failed to install application
and on the device Could not inspect the application package.
Removed it and now works.
You are using Xcode GM which is under beta stage. Use latest Xcode 5.1.1 available.
Also, these error occur while switching between simulator (32 bit and 64 bit).
Quit the simulator and re-build the application. OR
Reset simulator from "iOS simulator" -> "Reset content and settings.."
I changed my app name and bundle id midway. I happened to delete the Executable File name in my plist. I changed it back to "${EXECUTABLE_NAME}" (no quotes) and I'm back in business.

Resources