Universal Apps

RSS for tag

A single Universal app includes native binaries that run on Intel-based Macs and Apple Silicon Macs.

Posts under Universal Apps tag

41 Posts
Sort by:
Post not yet marked as solved
1 Replies
545 Views
I have download Xcode 12 for universal apps. I do not have VALID_ARCHS set at all and I can build FAT binary from Xcode IDE just fine. I have also installed CommandLine tools for Xcode 12, but when I try to build from the Terminal, I get just Intel binaries. Trying the -showdestinations option gives the following error: Ineligible destinations { platform:macOS, name:Any Mac }. If I try to set VALIDARCHS = arm64 to try build for ARM only, I get an error too. { platform:macOS, arch:x86_64h, error:My Mac doesn’t support any of targets’s architectures. You can set target’s Architectures build setting to Standard Architectures to support My Mac. } I have not found Command Line Tools for Xcode 12 Universal apps so maybe the Command Line Tools I have are for the standard Xcode 12 and can't build universal apps? Any ideas what might be wrong?
Posted
by
Post not yet marked as solved
1 Replies
2.2k Views
I'm trying to get my macOS app running natively on the Apple Silicon DTK and it's going fine so far. Unfortunately it makes use of a third party library which isn't (and probably won't ever be) available in form of a Universal Binary. This should be no problem, though, because I've been using that library via XPC before and the documentation clearly states that mixed architectures are supported as long as they are out-of-process. So I went ahead and configured Xcode's build settings as follows for the x86-only XPC target: ARCHS: x86_64 VALID_ARCHS: x86_64 The main app and also the XPC compile fine. But when running the app it fails to launch the XPC with the following error in the console: oah error: /var/db/oah/e089a6709d38c1a085254c76a7cb592fcceddb3f234a4aa318bb4ec25fe40d27/a37f39d2b061393d7731233ae89d90cd87c97f4edeeb46a78ad791/ c43ac96d2b/my.xpcBundleID.aot: unable to mmap __TEXT: 1 Does anyone know what's going on here?
Posted
by
Post not yet marked as solved
2 Replies
1.7k Views
My app uses several 3rd party C++ libraries such as Google's Protobuf and many others. Most of them are dynamic libs (.dylib) and were built using standard .configure/make/make install from source. It is not clear to me how to build these in order to get universal libraries which run on Intel and Apple Silicon. Is there a flag in the standard build system that causes it to output a universal binary? Or can I build two libs (one for Intel and one for Apple Silicon) and combine them into a universal binary?
Posted
by
Post marked as solved
3 Replies
2.9k Views
I'm building a universal application with SwiftUI that has an iOS app and Share Extension as well as a macOS app and Share Extension. There's a few places where I'm using SwiftUI attributes that are iOS-specific (example a NavigationView that has a StackNavigationViewStyle attribute) and need to provide an alternative when running on macOS. My question is: How do I ensure that these attributes that are only available for one platform don't cause build issues for the other platform? I've tried using the #if os(iOS) compiler directive, but then I get a build error saying "Unexpected platform condition (expected 'os' 'arch' or 'swift')" when doing something like this: 				NavigationView { 						... 				}         #if os(iOS)			 				.navigationViewStyle(StackNavigationViewStyle())         #endif
Posted
by
Post not yet marked as solved
6 Replies
3.1k Views
I have the Silicon Kit Mac mini and I am trying to run the IPA file for my iOS app on the Mac. I added the Mac to the provisioning profile and built the app on another computer. When I try to open the generated .ipa file on the silicon Mac I get the following error: Unable to install "[my app's name]" This app cannot be installed because its integrity could not be verified. I am using macOS Big Sur Version 11 Beta with the Apple A12Z chip.
Posted
by
Post not yet marked as solved
3 Replies
1.6k Views
Some context from the Human Interface Guidelines. It says that the AppIcon should be square in shape with no rounded edges. But when I build my app with the same image specs using Image Asset Catalog, it does not seems to be rounding the corners automagically. I know it does in iOS and iPadOS, but does it work macOS 11. And what about Icon shapes in older macOS Catalina? Will this change affect them. Square without rounded corners looks kinda ugly.
Posted
by
Post marked as solved
12 Replies
12k Views
Seeing these when trying to create an xcframework for Apple Silicon that supports Mac Catalyst and the iOS Simulator: Both ios-arm64-simulator and ios-x86_64-simulator represent two equivalent library definitions. Both ios-arm64-maccatalyst and ios-x86_64-maccatalyst represent two equivalent library definitions. Here's the command: xcodebuild -create-xcframework \ 		-framework ./xcframework-build/catalyst-x86_64/opencv2.framework \ 		-framework ./xcframework-build/catalyst-arm64/opencv2.framework \ 		-framework ./xcframework-build/osx-x86_64/opencv2.framework \ 		-framework ./xcframework-build/osx-arm64/opencv2.framework \ 		-framework ./xcframework-build/iphonesimulator-arm64/opencv2.framework \ 		-framework ./xcframework-build/iphonesimulator-x86_64/opencv2.framework \ 		-framework ./xcframework-build/iphoneos-arm64/opencv2.framework \ 		-output ./xcframework-build/opencv2.xcframework From my understanding fat binaries for these frameworks isn't valid, but maybe it is in this case? These are static frameworks if that matters at all. Using Xcode 12.2 RC.
Posted
by
Post marked as solved
6 Replies
3.4k Views
I'm getting an error building my Mac app for both Apple Silicon and Intel, related to a Swift package dependency. The dependency is a pure Swift package (SwiftyXMLParser), and I'm bringing it into my app with a package dependency from the git repository URL. My app is configured to build standard architectures to run natively on both Apple Silicon and Intel. The build fails because it looks like the package manager only provides the active architecture, not a universal library, when the latter is configured. It happens when I set "Build Active Architecture Only" to NO (if it's set to YES it succeeds, but then the app won't run on the other architecture). In particular, if I build on my M1 mini, the error is Could not find module 'SwiftyXMLParser' for target 'x86_64-apple-macos'; found: arm64, arm64-apple-macos If I build on my x86 MBP, same failure but the error is opposite (no arm64, found: x86_64). So clearly SPM+Xcode can provide either architecture - is it possible for it to provide a universal lib? Or do I need to download the source of the package and build it through a more manual process?
Posted
by
Post not yet marked as solved
5 Replies
7.2k Views
I could archive the app in Xcode 12.2 DKT device. however when I try to distribute IPA from archived files and it failed with 'IPA processing failed'. from the log files, there is no useful information. Does anyone have similar issues? I appreciate any suggestions how to solve this issue.
Posted
by
Post not yet marked as solved
9 Replies
1.1k Views
Hello - TLDR - Is there any sample code to demonstrate how one goes about creating dedicated XPCServices to wrap ARM and Intel-specific dylibs? We have an app we're looking at moving to a universal binary. In that same app we have a framework that currently wraps R functionality by directly linking to /Library/Frameworks/R.framework/Current . R now has dedicated Intel and ARM builds (https://mac.r-project.org/) After watching the 2020 WWDC session "Port your Mac app to Apple silicon" (https://developer.apple.com/videos/play/wwdc2020/10214/?time=2006), it sounds like, for us to deploy a universal binary I should look at wrapping the R interaction bits into dedicated ARM and Intel XPC services so the appropriate architecture for R will run. Is anyone aware of any sample code or extended documentation demonstrating the ins and outs of how to think about this? Thank you
Posted
by
Post not yet marked as solved
0 Replies
1.1k Views
Since a few days I can't compile my flutter project anymore. I tried several solutions found on the internet but none of them worked for me. I am using a MacBook Pro M1 with XCODE version 12.5.1 (12E507). You can find the output of the error I'm experiencing in the attached copy. Thank you for any useful help that can save me from this situation. Error message: 👇🏾  /bin/sh -c /Users/donarias/Library/Developer/Xcode/DerivedData/Runner-fdbfjdxtqbyzbqgfhspjraxpjmdc/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/Script-9740EEB61CF901F6004384FC.sh ../../../../../.pub-cache/hosted/pub.dartlang.org/flutter_datetime_picker-1.5.1/lib/flutter_datetime_picker.dart:311:32: Warning: Operand of null-aware operation '??' has type 'Color' which excludes null.  - 'Color' is from 'dart:ui'.                   color: theme.backgroundColor ?? Colors.white,                                ^ ../../../../../.pub-cache/hosted/pub.dartlang.org/get-4.3.4/lib/get_navigation/src/root/get_material_app.dart:297:15: Error: No named parameter with the name 'scrollBehavior'.               scrollBehavior: scrollBehavior,               ^^^^^^^^^^^^^^ ../../../../flutter/packages/flutter/lib/src/material/app.dart:217:9: Context: Found this candidate, but the arguments don't match.   const MaterialApp.router({         ^^^^^^^^^^^^^^^^^^ ../../../../../.pub-cache/hosted/pub.dartlang.org/get-4.3.4/lib/get_navigation/src/root/get_material_app.dart:340:15: Error: No named parameter with the name 'scrollBehavior'.               scrollBehavior: scrollBehavior,               ^^^^^^^^^^^^^^ ../../../../flutter/packages/flutter/lib/src/material/app.dart:167:9: Context: Found this candidate, but the arguments don't match.   const MaterialApp({         ^^^^^^^^^^^ Command PhaseScriptExecution failed with a nonzero exit code
Posted
by
Post not yet marked as solved
0 Replies
535 Views
Hello, We try to build an universal framework (especially for Silicon) but when we try to launch 'xcodebuild -create-xcframework ...' we got an error : "unable to create a Mach-O from the binary" We managed to create 2 archives (device and simulator) with thie command 'xcodebuild archive...' but then we got the error above when trying to generate xcframework. Our framework use VLCMobileKit so may be the error comes from that but we are pretty lost now :) , and xcodebuild command doesn't show furhter infos about the error. Thanks in advance
Posted
by
Post not yet marked as solved
0 Replies
506 Views
Rosetta and Rosetta 2 do not appear to be available.  All attempts to execute the Intel code failed with the "zsh: bad CPU type in executable" message.  Since I wasn't prompted to install Rosetta or Rosetta 2, I executed the following, % softwareupdate --install-rosetta which responded with I have read and agree to the terms of the software license agreement. A list of Apple SLAs may be found here: http://www.apple.com/legal/sla/ Type A and press return to agree: So, I typed the A and the return.  The result was 2021-10-03 04:31:49.497 softwareupdate[1775:240889] Package Authoring Error: 071-97390: Package reference com.apple.pkg.RosettaUpdateAuto is missing install KBytes attribute Install of Rosetta 2 finished successfully Although the message ended with "finished successfully", note the error disclosed. Furthermore, the behavior of my M1 Mac running Big Sur 11.6 did not change, i.e. my Intel-based Mac executables still failed to execute. So, what can be done?
Posted
by
Post not yet marked as solved
1 Replies
955 Views
I found some articles on MacOS 11.3, that are several months old, that intimated that Rosetta 2 will be discontinued in future releases. Is there any official timeline for the deprecation of Rosetta 2 for ARM based Macs? Thanks.
Posted
by
Post not yet marked as solved
3 Replies
774 Views
I have porting my existing application to support native M1, there a a lot of framework and library that I have already build for both platform. The strange result is when I archive the app on Intel machine. The binary work on Intel platform well. When I archive my application on M1 machine, the app can work on M1 well. But when I try to run app that build on M1 on Intel Machine, then I got the message said my app is damaged and can't be opened. The same situation got for build in Intel platform one. I try "lipo -archs" command on my app and I did get "x86_64 arm64" as result, so my app should already a universal app I guess. Does any body know are there some way to check what happened on my application? Thanks, any opinion will be appreciated ! Eric
Posted
by
Post not yet marked as solved
7 Replies
1.4k Views
Xcode 13.1 / MacOS 12.0.1 / M1Max Steps to reproduce. Create Archive via Xcode Distribute App -> Development Sign with the correct development Profile Start the App from the exported folder No problem on intel Mac !!! Right klick on the binary : Last login: Tue Nov 16 18:11:53 on ttys002 /Applications/APP1.app/Contents/MacOS/APP1 ; exit;                   /Applications/APP1.app/Contents/MacOS/APP1 ; exit; zsh: killed     /Applications/APP1.app/Contents/MacOS/APP1 No info in system.log. Same error if gatekeeper off. What is happening here?
Posted
by
Post marked as solved
1 Replies
262 Views
I have an app that started out as an iPhone/iPad app and I added support for Mac. According to videos and documentation I've read online, one of the things you get for free is the ability to resize screens. It does, in fact, work that way when I build to MacOS from Xcode. However, when I upload the build to Testflight and run that version of the app, installed by Testflight, it doesn't resize. I should qualify that. I can drag a corner to switch it between portrait and landscape, but the size remains the same. I'm not sure what to look for, especially since resizing works when I build from Xcode. Any suggestions? I'm using SideMenu as the navigation controller for the app. The main view controller that instantiates Side Menu adds four view controllers as children. One of those is a portrait-only view controller. Since it works as expected when I build from Xcode, anything I try will have to be archived and uploaded to Testflight. So any suggestions of likely things to try would be greatly appreciated. I am NOT doing anything with windowScene size restrictions.
Posted
by
Post not yet marked as solved
0 Replies
520 Views
Hi, I'm facing the same error! You example is Passed! But it doesn't work when I compile NCURSES. It seems that there are something wrong with my ld % ld -v @(#)PROGRAM:ld  PROJECT:ld64-711 BUILD 18:11:19 Aug  3 2021 configured to support archs: armv6 armv7 armv7s arm64 arm64e arm64_32 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em LTO support using: LLVM version 13.0.0, (clang-1300.0.29.3) (static support for 27, runtime is 27) TAPI support using: Apple TAPI version 13.0.0 (tapi-1300.0.6.5) % clang -v Apple clang version 13.0.0 (clang-1300.0.29.3) Target: arm64-apple-darwin21.1.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin Here are the configuration and error. ** Configuration summary for NCURSES 6.3 20211021:        extended funcs: yes        xterm terminfo: xterm-new         bin directory: /usr/local/bin         lib directory: /usr/local/lib     include directory: /usr/local/include/ncurses         man directory: /usr/local/share/man    terminfo directory: /usr/local/share/terminfo ** Include-directory is not in a standard location``` gcc ../objects/tic.o ../objects/dump_entry.o ../objects/tparm_type.o ../objects/transform.o -L../lib -Wl,-search_paths_first -DHAVE_CONFIG_H -I../progs -I. -I../include -D_DARWIN_C_SOURCE -DNDEBUG -O2 -Qunused-arguments -Wno-error=implicit-function-declaration -no-cpp-precomp  -DNCURSES_STATIC -L../lib  -lncurses -lncurses    -o tic ld: warning: ignoring file ../lib/libncurses.a, building for macOS-arm64 but attempting to link with file built for unknown-unsupported file format ( 0x21 0x3C 0x61 0x72 0x63 0x68 0x3E 0x0A 0x2F 0x20 0x20 0x20 0x20 0x20 0x20 0x20 ) Undefined symbols for architecture arm64:   "__nc_boolcodes", referenced from:       _nametrans in dump_entry.o       _dump_init in dump_entry.o   "__nc_boolfnames", referenced from:       _dump_init in dump_entry.o   "__nc_boolnames", referenced from:       _dump_init in dump_entry.o   "__nc_capcmp", referenced from:       _check_termtype in tic.o       _check_sgr in tic.o   "__nc_check_termtype2", referenced from:       _main in tic.o   "__nc_curr_col", referenced from:       _main in tic.o   "__nc_curr_line", referenced from:       _main in tic.o   "__nc_disable_period", referenced from:       _main in tic.o   "__nc_doalloc", referenced from:       _main in tic.o       _fmt_entry in dump_entry.o       _strcpy_DYN in dump_entry.o       _fmt_complex in dump_entry.o       _strncpy_DYN in dump_entry.o   "__nc_find_entry", referenced from:       _check_user_capability_type in tic.o       _nametrans in dump_entry.o   "__nc_find_user_entry", referenced from:       _check_termtype in tic.o       _check_user_capability_type in tic.o   "__nc_first_name", referenced from:       _main in tic.o       _check_termtype in tic.o       _fmt_complex in dump_entry.o       _dump_entry in dump_entry.o   "__nc_get_hash_table", referenced from:       _check_user_capability_type in tic.o       _nametrans in dump_entry.o   "__nc_head", referenced from:       _main in tic.o   "__nc_home_terminfo", referenced from:       _show_databases in tic.o   "__nc_infotocap", referenced from:       _check_termtype in tic.o       _fmt_entry in dump_entry.o   "__nc_name_match", referenced from:       _main in tic.o   "__nc_numcodes", referenced from:       _nametrans in dump_entry.o       _dump_init in dump_entry.o   "__nc_numfnames", referenced from:       _dump_init in dump_entry.o   "__nc_numnames", referenced from:       _dump_init in dump_entry.o   "__nc_pathlast", referenced from:       _valid_db_path in tic.o   "__nc_read_entry_source", referenced from:       _main in tic.o   "__nc_reset_tparm", referenced from:       _check_termtype in tic.o       _check_1_infotocap in tic.o   "__nc_resolve_uses2", referenced from:       _main in tic.o   "__nc_rootname", referenced from:       _main in tic.o   "__nc_set_source", referenced from:       _main in tic.o   "__nc_set_type", referenced from:       _main in tic.o   "__nc_set_writedir", referenced from:       _main in tic.o   "__nc_strcodes", referenced from:       _nametrans in dump_entry.o       _dump_init in dump_entry.o   "__nc_strfnames", referenced from:       _dump_init in dump_entry.o   "__nc_strict_bsd", referenced from:       _main in tic.o   "__nc_strnames", referenced from:       _check_termtype in tic.o      _dump_init in dump_entry.o       _dump_entry in dump_entry.o   "__nc_syntax", referenced from:       _check_termtype in tic.o   "__nc_tail", referenced from:       _main in tic.o   "__nc_tic_dir", referenced from:   _main in tic.o       _show_databases in tic.o   "__nc_tic_expand", referenced from:       _check_ansi_cursor in tic.o       _fmt_entry in dump_entry.o   "__nc_tic_written", referenced from:       _main in tic.o   "__nc_tinfo_fkeysf", referenced from:       _check_termtype in tic.o   "__nc_tiparm", referenced from:       _check_termtype in tic.o       _check_sgr in tic.o       _check_1_infotocap in tic.o       _same_color in tic.o   "__nc_tparm_analyze", referenced from:       _check_termtype in tic.o       _check_1_infotocap in tic.o   "__nc_tparm_err", referenced from:       _check_termtype in tic.o       _check_sgr in tic.o   "__nc_tracing", referenced from:       _main in tic.o   "__nc_trim_sgr0", referenced from:       _check_termtype in tic.o       _fmt_entry in dump_entry.o   "__nc_user_definable", referenced from:       _check_termtype in tic.o       _fmt_entry in dump_entry.o       _compare_entry in dump_entry.o   "__nc_visbuf", referenced from:       _similar_sgr in tic.o   "__nc_visbuf2", referenced from:       _check_termtype in tic.o       _check_sgr in tic.o       _similar_sgr in tic.o   "__nc_warning", referenced from:       _check_termtype in tic.o       _check_user_capability_type in tic.o       _check_sgr in tic.o       _check_sgr_param in tic.o       _check_1_infotocap in tic.o       _check_noaddress in tic.o       _check_ansi_cursor in tic.o       ...   "__nc_write_entry", referenced from:       _main in tic.o   "__nc_write_object", referenced from:       _dump_entry in dump_entry.o   "_curses_version", referenced from:       _main in tic.o   "_keyname", referenced from:       _check_termtype in tic.o   "_tgoto", referenced from:       _check_sgr_param in tic.o   "_tigetflag", referenced from:       _check_termtype in tic.o   "_tigetstr", referenced from:       _check_termtype in tic.o   "_tparm", referenced from:       _check_termtype in tic.o       _check_1_infotocap in tic.o      (maybe you meant: _tparm_type, _guess_tparm_type )   "_use_extended_names", referenced from:       _main in tic.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[1]: *** [tic] Error 1 make: *** [all] Error 2
Posted
by