Running the application on the iphone crashes - iphone

help solve the problem!
I have:
--Mac OS X 10.7.2
--Titanium Studio, build: 1.0.7.201112281340
--Xcode, ver 4.2.1, Build 4D502
--iPhone 5.0.1 iOs
--application I am trying to write
When I try to run the application on the iPhone Device I get the error.
Hier is Console Log
[TRACE] app property, ti.android.runtime : rhino
[DEBUG] Detecting modules in /Users/<USER>/Documents/Titanium Studio Workspace/sinoptic/modules
[DEBUG] Detecting modules in /Users/<USER>/Library/Application Support/Titanium/modules
[INFO] Performing clean build
[ERROR]
[ERROR] Error: Traceback (most recent call last):
File "/Users/<USER>/Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1/iphone/builder.py", line 1418, in main
execute_xcode("iphoneos%s" % iphone_version,args,False)
File "/Users/<USER>/Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1/iphone/builder.py", line 1180, in execute_xcode
output = run.run(args,False,False,o)
File "/Users/<USER>/Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1/iphone/run.py", line 39, in run
sys.exit(rc)
SystemExit: 65
In /Users//Documents/Titanium Studio Workspace/sinoptic/build/iphone/build/build.log i have:
CodeSign build/Debug-iphoneos/ZeusLight.app
cd "/Users/<USER>/Documents/Titanium Studio Workspace/sinoptic/build/iphone"
setenv CODESIGN_ALLOCATE /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/usr/bin/codesign --force --sign "iPhone Developer: <CERTIFICATE HIER>" "--resource-rules=/Users/<USER>/Documents/Titanium Studio Workspace/sinoptic/build/iphone/build/Debug-iphoneos/ZeusLight.app/ResourceRules.plist" --entitlements "/Users/<USER>/Documents/Titanium Studio Workspace/sinoptic/build/iphone/build/ZeusLight.build/Debug-iphoneos/ZeusLight-universal.build/ZeusLight.xcent" "/Users/<USER>/Documents/Titanium Studio Workspace/sinoptic/build/iphone/build/Debug-iphoneos/ZeusLight.app"
/Users/<USER>/Documents/Titanium Studio Workspace/sinoptic/build/iphone/build/Debug-iphoneos/ZeusLight.app: object file format unrecognized, invalid, or unsuitable
Command /usr/bin/codesign failed with exit code 1
** BUILD FAILED **
The following build commands failed:
CodeSign build/Debug-iphoneos/ZeusLight.app
(1 failure)
EXIT CODE WAS: 65
Exception detected in script:
Traceback (most recent call last):
File "/Users/<USER>/Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1/iphone/builder.py", line 1418, in main
execute_xcode("iphoneos%s" % iphone_version,args,False)
File "/Users/<USER>/Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1/iphone/builder.py", line 1180, in execute_xcode
output = run.run(args,False,False,o)
File "/Users/<USER>/Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1/iphone/run.py", line 39, in run
sys.exit(rc)
SystemExit: 65
Running on the emulator - there is no error, all is well.
The reason? This is driving me crazy!
Regards...

Try to delete the "build" folder inside your app source directory. Then again build for device.

Related

How Can I Solve "Failed To Source Bitbake" With Xilinx Petalinux SDK

I am running Ubuntu 16.04 with Xilinx Petalinux 2018.03 SDK. After a number of successful compilations I am now facing this error
$ petalinux-build
[INFO] building project
[INFO] sourcing bitbake
ERROR: Failed to source bitbake
ERROR: Failed to build project
How can I solved this issue?
Another reason to get the errors "ERROR: Failed to source bitbake" as well as "ERROR: Failed to build project" is a possible upgrade of Python on the build machine. The Petalinux SDK requires python v2 (>= 2.7.3) for the 2018.3 edition.
You can check under [YOUR_PROJECT]/build/build.log and you might see a log similar to this one below:
[INFO] building project
[INFO] sourcing bitbake
SDK environment now set up; additionally you may now run devtool to perform development tasks.
Run devtool --help for further details.
OpenEmbedded requires 'python' to be python v2 (>= 2.7.3), not python v3.
Please set up python v2 as your default 'python' interpreter.
ERROR: Failed to source bitbake
ERROR: Failed to build project
To remedy this issue remove the symbolic link under /usr/bin and make sure to create a new one that is pointing to Python 2.7:
sudo rm /usr/bin/python
sudo ln -s /usr/bin/python2.7 /usr/bin/python
First you need to investigate the error a little further, do this:
source /opt/pkg/petalinux/2018.3/settings.sh
It will return something similar to this below:
PetaLinux environment set to '/opt/pkg/petalinux/2018.3'
INFO: Checking free disk space
INFO: Checking installed tools
INFO: Checking installed development libraries
INFO: Checking network and other services
Source the environment setup:
source /opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/environment-setup-aarch64-xilinx-linux
followed by:
devtool --help
In my case I can see more about the actual error:
NOTE: Starting bitbake server...
ERROR: Unable to start bitbake server
ERROR: Last 10 lines of server log for this session (/opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/bitbake-cookerdaemon.log):
Traceback (most recent call last):
File "/opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/layers/core/bitbake/lib/bb/daemonize.py", line 77, in createDaemon
function()
File "/opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/layers/core/bitbake/lib/bb/server/process.py", line 433, in _startServer
self.cooker = bb.cooker.BBCooker(self.configuration, self.featureset)
File "/opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/layers/core/bitbake/lib/bb/cooker.py", line 178, in __init__
self.configwatcher = pyinotify.WatchManager()
File "/opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/layers/core/bitbake/lib/pyinotify.py", line 1764, in __init__
raise OSError(err % self._inotify_wrapper.str_errno())
OSError: Cannot initialize new instance of inotify, Errno=Too many open files (EMFILE)
ERROR: Unable to start bitbake server
ERROR: Last 10 lines of server log for this session (/opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/bitbake-cookerdaemon.log):
Traceback (most recent call last):
File "/opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/layers/core/bitbake/lib/bb/daemonize.py", line 77, in createDaemon
function()
File "/opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/layers/core/bitbake/lib/bb/server/process.py", line 433, in _startServer
self.cooker = bb.cooker.BBCooker(self.configuration, self.featureset)
File "/opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/layers/core/bitbake/lib/bb/cooker.py", line 178, in __init__
self.configwatcher = pyinotify.WatchManager()
File "/opt/pkg/petalinux/2018.3/components/yocto/source/aarch64/layers/core/bitbake/lib/pyinotify.py", line 1764, in __init__
raise OSError(err % self._inotify_wrapper.str_errno())
OSError: Cannot initialize new instance of inotify, **Errno=Too many open files (EMFILE)**
This is pointing to the /proc/sys/fs/inotify/max_user_instances that need to be increased. In my case I went from 128 to 256 by doing this:
sudo su
echo 256 > /proc/sys/fs/inotify/max_user_instances
You need to become root with "su" and change the mac_user_instances.

openCV.framework for a swift macOS application

My goal here is to have opencv embedded in macOS application as static framework. I clone the repo
cd opencv/platforms/osx
python build_framework.py build
Then i get the following error
** BUILD FAILED **
The following build commands failed:
CompileC platforms/osx/build/build/build-x86_64-
macosx/modules/world/OpenCV.build/Release/opencv_world.build/Objects-normal/x86_64/opencv-
onnx.pb.o modules/dnn/misc/onnx/opencv-onnx.pb.cc normal x86_64 c++
com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
============================================================
ERROR: Command '['xcodebuild', 'MACOSX_DEPLOYMENT_TARGET=10.12', 'ARCHS=x86_64', '-sdk',
'macosx', '-configuration', 'Release', '-parallelizeTargets', '-jobs', '16', '-target',
'ALL_BUILD', 'build']' returned non-zero exit status 65
============================================================
Traceback (most recent call last):
File "/Volumes/Dev/XCode-openCV/please/opencv/platforms/ios/build_framework.py", line 148,
in build
self._build(outdir)
File "/Volumes/Dev/XCode-openCV/please/opencv/platforms/ios/build_framework.py", line 122,
in _build
self.buildOne(target[0], target[1], main_build_dir, cmake_flags)
File "/Volumes/Dev/XCode-openCV/please/opencv/platforms/ios/build_framework.py", line 255,
in buildOne
execute(buildcmd + ["-target", "ALL_BUILD", "build"], cwd = builddir)
File "/Volumes/Dev/XCode-openCV/please/opencv/platforms/ios/build_framework.py", line 44, in
execute
retcode = check_call(cmd, cwd = cwd)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py",
line 190, in check_call
raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '['xcodebuild', 'MACOSX_DEPLOYMENT_TARGET=10.12',
'ARCHS=x86_64', '-sdk', 'macosx', '-configuration', 'Release', '-parallelizeTargets', '-
jobs', '16', '-target', 'ALL_BUILD', 'build']' returned non-zero exit status 65
I give up on this after couple hours. And maybe try to find another route. I find these two videos showing how to build the library with the cmake app, which builds and installs opencv at /usr/local/bin. He then opens XCode and points to these files, but he is making a macOS c++ command line app. Is there a way to use this c++ app in a swift app as a library or submodule?

Buildozer failed to execute the last command in Kivy

I'm making a simple apk using buildozer in kivy.
I tried re-installing two times android sdk ndk, but sdkmanager tools are not automatically installed.
# Apache ANT found at /home/shivam/.buildozer/android/platform/apache-ant-1.9.4
# Android SDK found at /home/shivam/.buildozer/android/platform/android-sdk
# Android NDK found at /home/shivam/.buildozer/android/platform/android-ndk-r17c
# Read available permissions from api-versions.xml
# Check application requirements
# Check garden requirements
# Compile platform
# Run '/usr/bin/python -m pythonforandroid.toolchain create --dist_name=firstapp --bootstrap=sdl2 --requirements=python3,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/shivam/.buildozer/android/platform/build" --ndk-api=21'
# Cwd /home/shivam/.buildozer/android/platform/python-for-android
[INFO]: Will compile for the following archs: armeabi-v7a
[INFO]: Found Android API target in $ANDROIDAPI: 27
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/shivam/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1073, in
main()
File "/home/shivam/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1067, in main
ToolchainCL()
File "/home/shivam/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 576, in
__init__
getattr(self, args.subparser_name.replace('-', '_'))(args)
File "/home/shivam/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 144, in
wrapper_func
user_ndk_api=self.ndk_api)
File "pythonforandroid/build.py", line 236, in prepare_build_environment
avdmanager = sh.Command(join(sdk_dir, 'tools', 'bin', 'avdmanager'))
File "/home/shivam/.local/lib/python2.7/site-packages/sh.py", line 1202, in __init__
raise CommandNotFound(path)
sh.CommandNotFound: /home/shivam/.buildozer/android/platform/android-sdk/tools/bin/avdmanager
# Command failed: /usr/bin/python -m pythonforandroid.toolchain create --dist_name=firstapp --bootstrap=sdl2 –
requirements=python3,kivy --arch armeabi-v7a --copy-libs --color=always --storage-
dir="/home/shivam/.buildozer/android/platform/build" --ndk-api=21
#
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2

Titanium Appcelerator Final Package Build Crash (Log Included)

I'm running into a problem with my final iPhone app build before I send it off to the App Store for approval. This is the first app I've built.
The app sometimes crashes on the actual device I'm testing with (an iPod Touch 2nd G, which is all I have at my disposal), but never in the iPhone simulator. Titanium Developer doesn't spit out any other errors either.
Here's the build/iphone/build/build.log file:
Starting build at 06/15/11 08:32
Build details:
timestamp=04/18/11 17:16
version=1.6.2
githash=878906d
Script arguments:
/Library/Application Support/Titanium/mobilesdk/osx/1.6.2/iphone/builder.py
distribute
"4.2"
"/Users/tfontaine/Desktop/MAMP testing/APPS/my_app"
com.example.fest2011
"MYAPP"
##EDITED OUT PROVISIONING NUMBER##
"null"
"/Users/tfontaine/Downloads"
iphone
Building from: /Library/Application Support/Titanium/mobilesdk/osx/1.6.2/iphone
Platform: Darwin Kernel Version 10.6.0: Wed Nov 10 18:13:17 PST 2010; root:xnu-1504.9.26~3/RELEASE_I386
Xcode path is: /Developer
Exception detected in script:
Traceback (most recent call last):
File "/Library/Application Support/Titanium/mobilesdk/osx/1.6.2/iphone/builder.py", line 664, in main
provisioning_profile = read_provisioning_profile(pp,o)
File "/Library/Application Support/Titanium/mobilesdk/osx/1.6.2/iphone/builder.py", line 216, in read_provisioning_profile
f = open(f,'rb').read()
IOError: [Errno 2] No such file or directory: u'/Users/tfontaine/Library/MobileDevice/Provisioning Profiles/##EDITED OUT PROVISIONING NUMBER##.mobileprovision'
Does this have something to do with acquiring the proper distribution keys?
The only time I get that error is when the provisioning profile is missing or not hooked up properly to a certificate in my keychain. Have you tried this in TiStudio instead of TiDeveloper?

Packaging Error, trying to make iPhone app in Titanium

I'm having problems trying to package my Appcelerator Titanium app.
It builds correctly, and I can run it on my iPod Touch.
When I try to Package for distribution in the App Store I get the following errors in build.log:
Build details:
timestamp=12/16/10 16:25
version=1.5.1
githash=16bbb92
Script arguments:
/Users/wfm2/Library/Application Support/Titanium/mobilesdk/osx/1.5.1/iphone/builder.py
distribute
"4.2"
"/Users/wfm2/Documents/Nick Hutton/SynthBasics1"
net.macdonaldsoftware.synthbasics1
"SynthBasics1"
<null>
"William Macdonald"
"/Users/wfm2/Documents/Nick Hutton/SynthBasics1"
iphone
Building from: /Users/wfm2/Library/Application Support/Titanium/mobilesdk/osx/1.5.1/iphone
Platform: Darwin Kernel Version 10.6.0: Wed Nov 10 18:13:17 PST 2010; root:xnu-1504.9.26~3/RELEASE_I386
Xcode path is: /Developer
Exception detected in script:
Traceback (most recent call last):
File "/Users/wfm2/Library/Application Support/Titanium/mobilesdk/osx/1.5.1/iphone/builder.py", line 599, in main
provisioning_profile = read_provisioning_profile(pp,o)
File "/Users/wfm2/Library/Application Support/Titanium/mobilesdk/osx/1.5.1/iphone/builder.py", line 212, in read_provisioning_profile
f = open(f,'rb').read()
IOError: [Errno 2] No such file or directory: u'/Users/wfm2/Library/MobileDevice/Provisioning Profiles/<null>.mobileprovision'
it does not appear that you have your mobile provisioning profile configured properly; based on the last line of the output you provided.
you need to goto developer.apple.com and download your provisioning profile