React native build to device failed - ios

I'm trying to build to an iOS device, building to simulator works fine.
This is what I get:
uncaught error Error: TypeError: unsupported file type at lookup (/Users/NAME/git/vex/vex-app react/VexAppReact/node_modules/image-size/lib/index.js:35:9)
at /Users/NAME/git/vex/vex-app-react/VexAppReact/node_modules/image-size/lib/index.js:93:22
at /Users/NAME/git/vex/vex-app-react/VexAppReact/node_modules/image-size/lib/index.js:50:9
at /Users/NAME/git/vex/vex-app-react/VexAppReact/node_modules/graceful-fs/graceful-fs.js:43:10
at FSReqWrap.oncomplete (fs.js:82:15)
See logs /var/folders/h8/42h3w_qd2r9fvpwy99jsnjq40000gn/T/react-packager.log
at SocketClient._handleMessage (SocketClient.js:144:23)
at BunserBuf. (SocketClient.js:53:42)
at emitOne (events.js:90:13)
at BunserBuf.emit (events.js:182:7)
at BunserBuf.process (/Users/NAME/git/vex/vex-app-react/VexAppReact/node_modules/bser/index.js:289:10)
at /Users/NAME/git/vex/vex-app react/VexAppReact/node_modules/bser/index.js:244:12
at nextTickCallbackWith0Args (node.js:452:9)
at process._tickCallback (node.js:381:13)
Command /bin/sh failed with exit code 1
I'm assuming there's something wrong with image assets. I didn't install the image-size node module myself, so I doubt there's something wrong with that module, it could be though.
Any suggestions welcome.

Solution: apparently you can't add png files to native ios build

Related

Writing an Appcelerator Titanium iOS module with 3rd party Framework

I'm trying to write a new module with an external framework. I've followed the instructions here: http://docs.appcelerator.com/platform/latest/#!/guide/iOS_Module_Project-section-43288810_iOSModuleProject-AddaThird-PartyFramework on how to add an external frame work.
The module compiles. The Titanium app also compiles. But when inside the iPhone emulator the application crashes (even before using the module).
I'm getting the following error in Titnaium Studio:
[ERROR] : An error occurred during build after 1m 19s 125ms
[ERROR] : Detected multiple crashes:
[ERROR] : /Users/ophir/Library/Logs/DiagnosticReports/SweetAlertDialogTest_2015-11-05-193036_Ophirs-Mac-mini.crash
[ERROR] : /Users/ophir/Library/Logs/DiagnosticReports/SweetAlertDialogTest_2015-11-05-193042_Ophirs-Mac-mini.crash
[ERROR] : /Users/ophir/Library/Logs/DiagnosticReports/SweetAlertDialogTest_2015-11-05-193122_Ophirs-Mac-mini.crash
[ERROR] : /Users/ophir/Library/Logs/DiagnosticReports/SweetAlertDialogTest_2015-11-05-193354_Ophirs-Mac-mini.crash
[ERROR] : /Users/ophir/Library/Logs/DiagnosticReports/SweetAlertDialogTest_2015-11-06-064617_Ophirs-Mac-mini.crash
[ERROR] : /Users/ophir/Library/Logs/DiagnosticReports/SweetAlertDialogTest_2015-11-06-072141_Ophirs-Mac-mini.crash
[ERROR] : /Users/ophir/Library/Logs/DiagnosticReports/SweetAlertDialogTest_2015-11-06-072205_Ophirs-Mac-mini.crash
[ERROR] : /Users/ophir/Library/Logs/DiagnosticReports/SweetAlertDialogTest_2015-11-06-072249_Ophirs-Mac-mini.crash
[ERROR] : /Users/ophir/Library/Logs/DiagnosticReports/SweetAlertDialogTest_2015-11-06-073843_Ophirs-Mac-mini.crash
[ERROR] : Note: these crashes may or may not be related to running your app.
TRACE | titanium exited with exit code 1
ERROR | Error: ti run exited with error code 1
at ChildProcess.<anonymous> (/Users/ophir/.appcelerator/install/5.0.4/package/node_modules/appc-cli-titanium/plugins/run.js:92:66)
at ChildProcess.emit (events.js:98:17)
at Process.ChildProcess._handle.onexit (child_process.js:820:12)
TRACE | Sending exit signal to titanium process: 19220
I checked inside the crash log and this is what I get:
Dyld Error Message:
Library not loaded: #rpath/SweetAlertFramework.framework/SweetAlertFramework
Referenced from: /Users/USER/Library/Developer/CoreSimulator/Devices/6451C367-A7B7-437D-956F-57E86D8419FD/data/Containers/Bundle/Application/683ED437-B0E6-42F0-BC8E-26B2E95829CA/SweetAlertDialogTest.app/SweetAlertDialogTest
Reason: image not found
I've checked the path inside module.xcconfig and it's correct. Another thing that seems strange here is the path in the crash log /Users/USER/Library/Developer/CoreSimulator/Devices/6451C367-A7B7-437D-956F-57E86D8419FD/data/Containers/Bundle/Application/683ED437-B0E6-42F0-BC8E-26B2E95829CA/SweetAlertDialogTest.app/SweetAlertDialogTest which is not a valid path on my machine.
Why doesn't it find the module?
I think #HansKnoechel meant to say *.framework, and iphone/platform. That way, when the module is actually bundled, the framework will be included as well. You can verify the framework is in the right place by checking the modules/iphone/<YourModule>/<YourModuleVersion>/platform directory.
It looks like the bundle of the 3rd party framework could not be referenced. Make sure you copy the *.framework files into platform/ios so they will be compiled. Also check the Xcode settings "Link binary with libraries" and make sure it is listed there.

Phonegap Command failed with exit code 74

Trying to build my Phonegap app in the terminal and getting these errors. Where do I go from here? Is there a way to identify the code 74?
xcodebuild: error: Unable to read project
cannot be opened because the project file cannot be parsed.
Error: phonegap Command failed with exit code 74.
After doing some research I believe it's because I was linking to: xmlns:gap="http://phonegap.com/ns/1.0">
but I should have been linking to:
xmlns:cdv="http://cordova.apache.org/ns/1.0">

Swift compiler error on Xcode 6

I have problems with Swift Compiler:
I created new project for iOs on latest Xcode 6 and tried to build - recieved 2 errors with ViewController.swift and AppDelegate.swift.
<unknown>:0: error: unable to execute command: Segmentation fault: 11
<unknown>:0: error: swift frontend command failed due to signal (use -v to see invocation)
<unknown>:0: error: unable to execute command: Bus error: 10
<unknown>:0: error: swift frontend command failed due to signal (use -v to see invocation)
I can post a full logs if if it is necessary.
What should i do? Thanks.
I have faced a similar issue while working with a swift project. I found this on Apple Support Website. It says that this type of error occurs when you tried to access an non-existent/inaccessible memory address. To solve the issue you can quit unused applications or even restart the mac which will probably help you.

Error in using "dumpdecrypted" to decrypt ios application

I am trying to use 'dumpdecrypted' to decrypt iOS Application.
In accordance with README, I compiled dumpdecrypted.dylib and send it to my device, and I run command like below:
IPad-mini:/var/mobile root# DYLD_INSERT_LIBRARIES=dumpdecrypted.dylib /var/mobile/Applications/XXXXX
XXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/AppName.app/AppName
But there was an error:
dyld: could not load inserted library 'dumpdecrypted.dylib' because no suitable image found. Did find:
dumpdecrypted.dylib: stat() failed with errno=1
Trace/BPT trap:5
How can I solve this problem??
My device is iPad mini 2(iOS7.1.2 Jailbreaked).
Put dumpdecrypted.dylib in /usr/lib, then move to that directory (i.e., cd /usr/lib).
Then execute the command:
DYLD_INSERT_LIBRARIES=dumpdecrypted.dylib /var/mobile/Applications/D9DC2DBC-3C80-43E8-AF79-C01480A46271/rcplus.app/rcplus
You will find the output in the current directory (/usr/lib).

Errors when trying to build iOS with cordova in Mavericks (10.9.1)

Days ago I built the application for Android, zero problems, but now, when I try to do the same for iOS (obviously not the same commands) I always receive an error.
I use the following command:
cordova platform add ios
And I get the following error:
Downloading cordova library for ios...
Download complete
Creating ios project...
Error: An error occured during creation of ios sub-project.
File "/Users/xxxxx/.cordova/lib/ios/cordova/3.3.0/bin/update_cordova_subproject", line 31
print __doc__
^
SyntaxError: invalid syntax
at /usr/local/lib/node_modules/cordova/src/platform.js:282:30
at ChildProcess.exithandler (child_process.js:641:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Socket.<anonymous> (child_process.js:956:11)
at Socket.EventEmitter.emit (events.js:95:17)
at Pipe.close (net.js:466:12)
I tried also with:
phonegap build ios
But I get the same error and I don't know how to fix it. I've been looking on the Internet and I found some guy with the same problem but nobody could help him.
I run the commands with sudo, that isn't the problem.
I recently got the same error.
My problem was that I'm using Python3 by default. print in Python2 is a statement wherease in Python3 it's a function.
.cordova/lib/ios/cordova/3.3.0/bin/update_cordova_subproject has a shebang that calls /bin/python.
I had to replace #!/bin/python with #!/bin/python2.7 to use python2.7 on this script.
I have the exactly same problem with you. However, the way replace "#!/bin/python with #!/bin/python2.7" doesn't work for me.
Inspired by the explanation of Matthieu Riegler, I change print __doc__ to print(__doc__) in line 31 and print line to print(line) in line 97. Eventually, it works.

Resources