xcodebuild throws "Unable to mount developer disk image" warning even when building against a generic device - xcodebuild

Running the command xcodebuild -scheme "SchemeName" -configuration Release -derivedDataPath build/DerivedData -destination generic/platform=iOS clean build throws this warning:
2018-03-28 18:18:44.282 xcodebuild[865:1393851] iPhoneConnect: ## Unable to mount developer disk image, (Error Domain=com.apple.dtdevicekit Code=601 "Could not locate device support files." UserInfo={DeviceType=iPhone9,3,
NSLocalizedDescription=Could not locate device support files., NSLocalizedRecoverySuggestion=This iPhone 7 (Model 1660, 1778, 1779, 1780) is running iOS 11.3 (15E5216a), which may not be supported by this version of Xcode.}) {
DeviceType = "iPhone9,3";
NSLocalizedDescription = "Could not locate device support files.";
NSLocalizedRecoverySuggestion = "This iPhone 7 (Model 1660, 1778, 1779, 1780) is running iOS 11.3 (15E5216a), which may not be supported by this version of Xcode.";
}
even though I'm clearly building against a generic device, and not for the connected iPhone 7 device.
How can I disable these warnings?

Related

local environment cause expo build crash on Testflight

My code runs well on ios simulators and but it crashes on Testflight. When my friend clones the code and their code runs great with Testflight. It must be my environment settings then. Here is what I think might cause the issue:
1.when I do expo run: ios --configuration Release, Error: cannot find ‘ExpoModule’ in scope
2.“expo”: “^44.0.0”,
“expo-constants”: “~13.0.1”,
“react”: “17.0.1”,
“react-dom”: “17.0.1”,
“react-native”: “0.64.3”,
“yarn”: “1.22.17”,
“npm”: “6.14.14”,
"node":"12.17.5",
“expo-CLI”: " 5.0.3",
3.expo run:ios --configuration Release. generate tar file, and it crashes on the simulator as well, the crash code said
Feb 3 00:04:19 Xs-iMac OrgCorescore[69361]: assertion failed: 20C69 18E182: libxpc.dylib + 50305 [454053CA-B690-3B99-BE31-2369B04EA493]: 0x7d
com.apple.CoreSimulator.SimDevice.DACCEDA2-9E0B-4CA7-AF56-C134FBF4F4C9[49383] (UIKitApplication:org.core[0d61][rb-legacy][69361]): Service exited due to SIGABRT
Feb 3 00:04:19 XIs-iMac OrgCorescore[69362]: assertion failed: 20C69 18E182: libxpc.dylib + 50305 [454053CA-B690-3B99-BE31-2369B04EA493]: 0x7d
Thank you so much.

Cannot load native library libLiteCore.dylib on M1

I'm trying to build a JVM application (mostly Kotlin) on my M1 MacBook that uses CouchbaseLite.
I have this in my build.gradle file:
implementation "com.couchbase.lite:couchbase-lite-java:3.0.0-beta02"
(also tried it with a non-beta version 2.8.4)
Gradle sync + build is fine but everytime I run the up and try to create a database
db = Database(LOCAL_DB_NAME, config)
I get the following error:
java.lang.IllegalStateException: Cannot load native library libLiteCore.dylib #/Users/ale/Projects/server/CouchbaseLiteTemp/5e3b1711cace9de693b3e1e0bea0f2f8/libLiteCore.dylib for Mac OS X/aarch64
at com.couchbase.lite.internal.NativeLibrary.load(NativeLibrary.java:113)
at com.couchbase.lite.internal.CouchbaseLiteInternal.init(CouchbaseLiteInternal.java:80)
at com.couchbase.lite.CouchbaseLite.init(CouchbaseLite.java:54)
at com.couchbase.lite.CouchbaseLite.init(CouchbaseLite.java:42)
at com.couchbase.lite.CouchbaseLite.init(CouchbaseLite.java:33)
at de.ihaus.Main.Database.CouchbaseManager.initContext(CouchbaseManager.kt:34)
at de.ihaus.Main.Dingo$main$1.invoke(Dingo.kt:15)
at de.ihaus.Main.Dingo$main$1.invoke(Dingo.kt:14)
at de.ihaus.Main.Login.LoginManager.onLoginSuccess(LoginManager.kt:64)
at de.ihaus.Main.Login.LoginManager$LoginWorker.run(LoginManager.kt:53)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.UnsatisfiedLinkError: /Users/ale/Projects/server/CouchbaseLiteTemp/5e3b1711cace9de693b3e1e0bea0f2f8/libLiteCore.dylib: dlopen(/Users/ale/Projects/server/CouchbaseLiteTemp/5e3b1711cace9de693b3e1e0bea0f2f8/libLiteCore.dylib, 0x0001): tried: '/Users/ale/Projects/server/CouchbaseLiteTemp/5e3b1711cace9de693b3e1e0bea0f2f8/libLiteCore.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/lib/libLiteCore.dylib' (no such file)
at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2442)
at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2498)
at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2694)
I've looked around but CouchbaseLite is supposed to work on an M1.
What am I doing wrong?
Turns out the problem was the Apple Silicon version of the JDK.
If I run the project with an x86_64 version of the JDK, Rosetta kicks in and it works. Will have to live with the performance hit for now, but at least I'm not blocked anymore.
Unfortunately, CBL-Java doesn't support Native Mac M1 yet.

SIGSEGV - Fatal Error in JavaFX Application - libjvm.so [duplicate]

#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007ff17a60c678, pid=4219, tid=140673779791616
#
# JRE version: Java(TM) SE Runtime Environment (8.0-b124) (build 1.8.0-ea-b124)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.0-b66 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# V [libjvm.so+0x665678] jni_invoke_nonstatic(JNIEnv_*, JavaValue*, _jobject*, JNICallType, _jmethodID*, JNI_ArgumentPusher*, Thread*)+0x38
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /media/data/K's World/javaFX/ChatApp/hs_err_pid4219.log
Compiled method (c1) 16675 988 3 java.util.concurrent.atomic.AtomicBoolean::set (14 bytes)
total in heap [0x00007ff16535ef50,0x00007ff16535f2a0] = 848
relocation [0x00007ff16535f070,0x00007ff16535f0a0] = 48
main code [0x00007ff16535f0a0,0x00007ff16535f1c0] = 288
stub code [0x00007ff16535f1c0,0x00007ff16535f250] = 144
metadata [0x00007ff16535f250,0x00007ff16535f258] = 8
scopes data [0x00007ff16535f258,0x00007ff16535f268] = 16
scopes pcs [0x00007ff16535f268,0x00007ff16535f298] = 48
dependencies [0x00007ff16535f298,0x00007ff16535f2a0] = 8
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
#
I am writing chat App in javaFx..and I am using eclipse IDE..
My Application is running well but I don't know why suddenly application has been stopped.
It sounds like you're running JavaFX with Java 8 on Linux, and you've run into this bug:
https://bugs.openjdk.java.net/browse/JDK-8141687
App crashes while starting Main.class in JavaFx
ava version "1.8.0_60" Java(TM) SE Runtime Environment (build
1.8.0_60-b27) Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
ADDITIONAL OS VERSION INFORMATION : Mint17.2 Cinnamon 64Bit
SUGGESTION: Try a different version of Java/JavaFX.
Run sudo update-alternatives --config java to see what alternatives are already present on your system. I would downgrade to Java 1.7 if possible.
https://askubuntu.com/questions/272187/setting-jdk-7-as-default
If there are no suitable candidates, use apt-get install openjdk-7-jdk:
https://www.digitalocean.com/community/tutorials/how-to-install-java-on-ubuntu-with-apt-get
I had the same issue (except that it was java-8-oracle build 101) and found out why it was happening:
I have a login screen that appears before my main application and that screen gets closed after the login occurs and, apparently, closing it (or even hiding it) and showing a new window makes it crash.

mobile first cli project deploy failing

when i try to deploy my project using MFP CLI it gives the following error
xxxx-Macmini:Nauth user-x$ mfp build
App Nauth was successfully built.
xxxx-Macmini:Nauth user-x$ mfp deploy
Initializing MobileFirst Console
Error: The MobileFirst server that you have configured does not appear to be running. Start the server with 'mobilefirst start'.
mfp info
xxxx-Macmini:Nauth user-x$ mfp info OS: darwin x64 Release: 11.4.2
System Memory: 128 MB free out of 4096 MB Node: v0.10.30 MobileFirst
CLI: 7.0.0.00.20150610-1400 Current directory:
/Volumes/Development/wlsamples/NAuth2/apps/Nauth
Current project: /Volumes/Development/wlsamples/NAuth2
Adapter: SqlAuth
(/Volumes/Development/wlsamples/NAuth2/adapters/SqlAuth/SqlAuth.xml)
Description: SqlAuth Type: sql Procedures: readuser,
submitAuthentication, getBalance
Application: Nauth
(/Volumes/Development/wlsamples/NAuth2/apps/Nauth/application-descriptor.xml)
Description: Nauth Type: hybrid application Features: Environments:
iphone Skins:
Server location:
/Users/user-x/.ibm/mobilefirst/7.0.0.00.20150610-1353/server Server
binary:
/Users/user-x/.ibm/mobilefirst/7.0.0.00.20150610-1353/server/wlp/bin/server
MobileFirst instance:
/Users/user-x/.ibm/mobilefirst/7.0.0.00.20150610-1353/server/wlp/usr/servers/worklight
objc[26232]: Class JavaLaunchHelper is implemented in both
/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/bin/java
and
/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/libinstrument.dylib.
One of the two will be used. Which one is undefined. WebSphere
Application Server 8.5.5.4 (1.0.7.cl50420141121-1414) on Java
HotSpot(TM) 64-Bit Server VM, version 1.8.0_45-b14 (en_US)
Environment variables: TERM_PROGRAM: Apple_Terminal rvm_bin_path:
/Users/user-x/.rvm/bin TERM: xterm-256color SHELL: /bin/bash TMPDIR:
/var/folders/0m/ftx97h0n1rbcdwb3b3sv18lm0000gn/T/
Apple_PubSub_Socket_Render: /tmp/launch-pbGaeh/Render
TERM_PROGRAM_VERSION: 303.2 TERM_SESSION_ID:
8CB82941-523E-4034-BCA0-470F186ED261 USER: user-x COMMAND_MODE:
unix2003
_system_type: Darwin rvm_path: /Users/user-x/.rvm SSH_AUTH_SOCK: /tmp/launch-n9tSIx/Listeners
__CF_USER_TEXT_ENCODING: 0x1F5:0:0 Apple_Ubiquity_Message: /tmp/launch-bCTtmF/Apple_Ubiquity_Message WEBWORKS_HOME:
/Applications/BB10 WebWorks SDK 2.2.0.15 rvm_prefix: /Users/user-x
PATH: /Applications/BB10 WebWorks SDK 2.2.0.15:/Applications/BB10
WebWorks SDK
2.2.0.15/cordova-blackberry/bin/dependencies/bb-tools/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin:/Applications/IBM/MobileFirst-CLI:/Users/user-x/.rvm/bin
PWD: /Volumes/Development/wlsamples/NAuth2/apps/Nauth JAVA_HOME:
/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home
_system_arch: i386
_system_version: 10.7 rvm_version: 1.26.11 (latest) SHLVL: 2 HOME: /Users/user-x LOGNAME: user-x LC_CTYPE: UTF-8 DISPLAY:
/tmp/launch-BI7HzF/org.x:0
_system_name: OSX
_: /Applications/IBM/MobileFirst-CLI/IBMnode/bin/node WLP_USER_DIR: /Users/user-x/.ibm/mobilefirst/7.0.0.00.20150610-1353/server/wlp/usr
Java home is set properly xxxx-Macmini:Nauth
user-x$ echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home
MobileFirst Platform Foundation does not support Java 8 - you may only use Java 6 or 7.
After doing (1), also uninstall the CLI (/Applications/IBM/MobileFirst-CLI/Uninstaller) and download the latest available iFix from IBM Fix Central which contains several bug fixes for the CLI, including a potential fix for the server mentioned in the question.

"Symbol not found" Crash while Testing Mac OS X 10.7-specific code on 10.6

I have an application that uses a few classes found only in 10.7 Lion. (For example, NSFileCoordinator.)
When my application launches, it can use NSFileCoordinator to coordinate read access to the data store. (I save to XML.)
The application launches fine under 10.7 Lion, but when launching under 10.6 Snow Leopard, the application crashes with the error shown below.
My base SDK is set to 10.7, and the deployment target is 10.6. As far as I can tell, all my code is properly wrapped, like:
if (NSClassFromString(#"NSFileCoordinator") != nil) {
// Do something the 10.7 way
} else {
// Do something the 10.6 way
}
But for some reason, I'm still seeing the crash. Since the Base SDK is 10.7, I can't run the application under Xcode in 10.6, making debugging difficult. Additional messages are being logged to the console:
9/1/11 9:48:03 AM [0x0-0x18018].com.me.myapp[173] dyld: Symbol not found: _OBJC_CLASS_$_NSFileCoordinator
9/1/11 9:48:03 AM [0x0-0x18018].com.me.myapp[173] Referenced from: /Volumes/Macintosh HD/Users/Me/Library/Developer/Xcode/DerivedData/Mac-ebdxgdvcqfnptlftkreamrwdxetd/Build/Products/Debug/myapp.app/Contents/MacOS/myapp
9/1/11 9:48:03 AM [0x0-0x18018].com.me.myapp[173] Expected in: /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
9/1/11 9:48:03 AM [0x0-0x18018].com.me.myapp[173] in /Volumes/Macintosh HD/Users/Me/Library/Developer/Xcode/DerivedData/Mac-ebdxgdvcqfnptlftkreamrwdxetd/Build/Products/Debug/myapp.app/Contents/MacOS/myapp
And the crash report:
Process: myapp [137]
Path: /Volumes/Macintosh HD/Users/Me/Library/Developer/Xcode/DerivedData/Mac-ebdxgdvcqfnptlftkreamrwdxetd/Build/Products/Debug/myapp.app/Contents/MacOS/myapp
Identifier: com.me.myapp
Version: 1.5.0 (150)
Code Type: X86-64 (Native)
Parent Process: launchd [92]
Date/Time: 2011-09-01 09:40:32.591 -0400
OS Version: Mac OS X 10.6.8 (10K549)
Report Version: 6
Interval Since Last Report: 2009 sec
Crashes Since Last Report: 5
Per-App Crashes Since Last Report: 5
Anonymous UUID: 32784C79-0821-471E-BCBF-BE5874774075
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000
Crashed Thread: 0
Dyld Error Message:
Symbol not found: _OBJC_CLASS_$_NSFileCoordinator
Referenced from: /Volumes/Macintosh HD/Users/Me/Library/Developer/Xcode/DerivedData/Mac-ebdxgdvcqfnptlftkreamrwdxetd/Build/Products/Debug/myapp.app/Contents/MacOS/myapp
Expected in: /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
in /Volumes/Macintosh HD/Users/Me/Library/Developer/Xcode/DerivedData/Mac-ebdxgdvcqfnptlftkreamrwdxetd/Build/Products/Debug/myapp.app/Contents/MacOS/myapp
#Anomie has the right answer but let me expand on it some more.
Here is the code of a command line tool that is similar to what you are doing:
int main (int argc, const char * argv[])
{
#autoreleasepool {
if (NSClassFromString(#"NSFileCoordinator")) {
NSLog(#"Version >= 10.7");
} else {
NSLog(#"Version < 10.7");
}
}
return 0;
}
The only framework that this program links to is Foundation. But in order to weakly link to this framework you must do the following:
Click on the project in the project browser
Go to "Build Phases"
Go to "Link Binary With Libraries" and remove "Foundation.framework"
Go to "Build Settings" and add the following "Other Linker Flags":
-weak_framework Foundation
Rebuild your project. I've tested on OS X 10.6 and 10.7 and neither crashed and both produced the expected output. Hope this helps.
You need to weakly link the framework, so these unresolved symbols won't be an error at load time.