Igor Delovski Board Forum Index Igor Delovski Board
My Own Personal Slashdot!
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Xcode tips

 
Post new topic   Reply to topic    Igor Delovski Board Forum Index -> Mac Cocoa
Mac Cocoa  
Author Message
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Mon Sep 29, 2008 10:44 am    Post subject: Xcode tips Reply with quote

SO - What are those little Xcode tips & tricks you wish you knew about 2 years ago?

"With a huge influx of newbies to Xcode I'm sure there are lots of Xcode tips and tricks to be shared."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Tue Sep 30, 2008 10:08 pm    Post subject: Reply with quote

SO - What #defines are setup by xCode when compiling for iPhone

The relevant definitions are TARGET_OS_IPHONE and TARGET_IPHONE_SIMULATOR,
which will be defined provided that you #include "TargetConditionals.h"
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Sat Jan 31, 2009 4:23 pm    Post subject: Reply with quote

mobileorchard.com - 14 Essential Xcode Tips, Tricks and Resources for iPhone Devs

"Xcode is big. Apple’s Xcode Workspace Guide, a terse inventory of its
features, is 116 pages. Xcode’s preference window has 13 sections, each
with a dozen or more items. There are at least 206 keyboard shortcuts. I
started counting menu items but gave up the ghost when I’d topped 300
items before finishing the third section."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Sun Jul 26, 2009 7:27 pm    Post subject: Reply with quote

adc - How to add include path and library path in XCode project

"Under "Search Paths" group I added

Header Search Paths | /usr/include/libxml2/** .
Library Search Paths | /Users/heberlei/Development/amf/builf/Debug

Then for the "Release" version of the application I have a different "Library
Search Paths" pointing to the "Release" version of the library."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Tue Aug 18, 2009 8:42 pm    Post subject: Reply with quote

xcode-users list - Misspelled methods

"However, gcc can warn if you send an unknown message to an object. Take
a look at: -Wstrict-selector-match -Wundeclared-selector"
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Sat Aug 29, 2009 5:02 pm    Post subject: Reply with quote

MF - Recommended Reading for Snow Leopard

"There's a lot of new knowledge to take in with Snow Leopard; the following
links are ones that either I've personally found helpful, or I believe contain
fairly essential pieces of information for dealing with the new OS. The first
four links are the really important ones."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Sat Oct 10, 2009 10:31 pm    Post subject: Reply with quote

so - Using static library in an application crashes the device but
not the iphone simulator


"This is due to a bug in the current SDK linker. See..."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Fri Nov 20, 2009 5:40 pm    Post subject: Reply with quote

Domain of the Bored - Warnings I turn on, and why

"I've started turning on most of Xcode's warning options and one warn-
ing-related build setting in all of my personal projects. I suggest you do
the same."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Fri Mar 19, 2010 12:27 am    Post subject: Reply with quote

Jeff LaMarche - Xcode Project Template Expansion Macros

"Earlier today, I lazy-tweeted to see if anyone had a definitive list of Xco-
de's project expansion macros. If you open up a project template and poke
around, you'll see both in filenames and in file contents, these all-cap words
surrounded by three underscores like ___PROJECTNAME___. These are re-
placement macros that get replaced with some other value when you create
your project based on that template. ___PROJECTNAME___, for example,
gets replaced with the name of the project as it was typed in by the user into
the new project assistant."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Sat Mar 19, 2011 12:53 am    Post subject: Reply with quote

MF - iOS Documentation in Xcode 4?

"... go into XCode | Preferences, under the Documentation tab, see if you
have GET buttons next to the iOS Libraries. If you do, click them and they
will download."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Tue Mar 22, 2011 10:15 pm    Post subject: Reply with quote

pragmaticstudio.com - Xcode4Shortcuts.pdf
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Sat Oct 22, 2011 12:14 am    Post subject: Reply with quote

if(self = [super init]) - LLVM warning! How are you dealing with it?

"Bring up the project navigator and choose your project. In the main window
that appears, choose "All". Under the section "LLVM compiler 2.0 - Warnings",
choose "Other Warning Flags". Add the flag "Wno-idiomatic-parentheses" for
both Debug and Release."


Edit - "Missing Braces and Parentheses" is a better thing to use


Last edited by delovski on Sat Oct 22, 2011 2:53 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Sat Oct 22, 2011 12:54 am    Post subject: Reply with quote

http://comments.gmane.org/gmane.comp.compilers.clang.devel/10755

"I noticed that clang++ seems to always use the option '-Wswitch-enum'. Shouldn't it be turned off by default? Or is there a way to turn it off?"
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Sat Nov 05, 2011 6:53 pm    Post subject: Reply with quote

bugsense - Creating a framework for iOS

"The advantage of making a framework is that it makes life a lot easier for
our users. You just add the framework in your project and you’re good to
go. We can bundle images and XIB files without making installation more
complex."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Thu Nov 17, 2011 1:53 am    Post subject: Reply with quote

so - Issue with iphone sdk 4.2.1

"warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1
(8C148a)/Symbols/System/Library/PrivateFrameworks/"
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Tue Nov 22, 2011 11:21 pm    Post subject: Reply with quote

macworld.com - Restoring PPC, SDK 10.4/10.5 and GCC 4.0 Support to Xcode4

"Unfortunately Apple decided to drop support for PPC, SDKs 10.4/10.5 and
GCC 4.0 in Xcode4. This hasn't been done for technical reasons, though, but
only because Apple wanted to do that."
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Wed Feb 08, 2012 7:44 pm    Post subject: Reply with quote

Miso Engineering - Work Efficiently With XCode

"Below are some tips and tricks I use in my everyday coding sessions. This
post has the beginner in mind, though I hope advanced and expert XCode
users may occasionally find something useful."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Sat Mar 03, 2012 2:18 am    Post subject: Reply with quote

Touch Code Magazine - XCode 4 – an honest opinion

"I’ll be ranting in this post, so if you are not willing to take constructive
criticism towards Apple, do not read."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Sat Mar 03, 2012 2:21 am    Post subject: Reply with quote

lists.apple.com - Xcode - An Apple Embarrassment

"Apple and Xcode are an embarrassment to professional software development."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Thu Mar 08, 2012 9:43 pm    Post subject: Reply with quote

http://openradar.appspot.com/10597149
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Wed Apr 25, 2012 10:59 pm    Post subject: Reply with quote

http://forums.macrumors.com/showthread.php?t=1355158
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Thu May 31, 2012 10:39 pm    Post subject: Reply with quote

Code:
static BOOL FBIsDeviceIPad() {
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 30200
    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
        return YES;
    }
#endif
    return NO;
}
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Fri Jun 01, 2012 10:52 am    Post subject: Reply with quote

so - How to unlink a framework on program start

"The problem is the Dropbox API requires at least iOS 4.2. Ok.

I decided to save the possibility of using the program under 3.1.3, but if
it is 4.2 and higher, there will be Dropbox functionality. ... When I link
Dropbox.framework to my project, the program works great on iPhone
Simulator, but it cannot be started on my iPhone 3.1.3.

Symbol not found: _kSecAttrAccessible from: Security.framework

...

Under 'Target Membership' change 'Required' to 'Optional.'"
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Tue Aug 21, 2012 8:50 pm    Post subject: Reply with quote

so - Adding Older iOS SDKs to Xcode 4.1 in Lion

"Actually it is possible to add older SDKs as long as you can still get your
hands on an older version of Xcode with the older SDK."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Fri Oct 19, 2012 7:16 pm    Post subject: Reply with quote

https://forums.dropbox.com - Rebuilding DropboxSDK for iOS

"Here's how the framework is built:

xcodebuild -configuration Release -target DropboxSDK
xcodebuild -configuration Release -target DropboxSDK -sdk iphonesimulator
cp -R DropboxSDK/build/Release-iphoneos/DropboxSDK.framework/ $(SDK_BUILD_DIR)/DropboxSDK.framework
lipo -output $(SDK_BUILD_DIR)/DropboxSDK.framework/DropboxSDK -create DropboxSDK/build/Release-iphoneos/DropboxSDK.framework/DropboxSDK -arch i386 DropboxSDK/build/Release-iphonesimulator/DropboxSDK.framework/DropboxSDK


Basically, you build the framework for the device and the simulator, and then use lipo on the resulting object files to create a fat binary."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Thu Oct 31, 2013 1:35 am    Post subject: Reply with quote

Apple Support Forum - xcode 3.2.6 installation failed?

"I'm on OS 10.6.8 on a macbook air and trying to install the xcode 3.2.6 that
i downloaded from apple. I have plenty of free disk space. When I run the
installer I get the message: The Installation Failed. An unknown installation
error has occured. I've tried installing from a new admin user. I'm not sure
where to look or how to solve this problem. Any ideas?"
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Thu Nov 07, 2013 11:49 pm    Post subject: Reply with quote

so - Apple PrefPane example fails to build with clang error objecting to both -fobjc-arc and -fobjc-gc

"All 64-bit preference panes are expected to use garbage collection. Using
garbage collection will, in most cases, simplify your code and reduce the
likelihood of memory leaks."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Thu Nov 19, 2015 7:58 pm    Post subject: Reply with quote

puredata - How Do I Make Fat Binaries?

Using lipo:

lipo -create <file1> <file2> <...> -output <file>
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Fri Aug 26, 2016 8:29 am    Post subject: Reply with quote

universalmind - What every iOS Developer Should Be Doing with Instruments

"You've just wrapped up development on a shiny new iOS project and
have done your best to ensure that the app doesn't crash and it seems to
run ok on your test devices, but is it ready to submit? If you haven't done
any profiling in Instruments, the answer is probably no. Just because it
doesn't crash doesn't mean that it's going to behave and run well on your
user's devices"
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Tue Jan 10, 2017 5:06 pm    Post subject: Reply with quote

wikihow.com - How to Make a DMG File on a Mac

"One way to store or group files on a Mac is to create a Disk Image. A Disk
Image is a file which has the properties of a separate hard drive or CD and
allows for greater password protection and compression. It has a size limit
and options for encryption to keep your files safe and secure. While there
are a few applications that perform this task for you, it is recommended
that you complete this process manually."


Apple - Disk Utility for Mac: Create a disk image using Disk Utility
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Wed May 17, 2017 9:08 am    Post subject: Reply with quote

adc - Exporting Your Framework Interface

"For ANSI C-based code, you can usually just prefix an underscore character
to the name of a function or variable to get the symbol name. For languages
like C++, which uses mangled symbol names, you may need to run the nm
tool to get the list of existing symbol names. Run nm with the -g option to
see the currently exported symbols. You can then copy the output from the
tool and paste it into your exports file, ..."
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Wed May 24, 2017 9:33 am    Post subject: Reply with quote

jontolof - Using xcconfig files for your XCode Project

"Working as a developer you sooner or later will have to mess with the projects
build settings. It might be that you have to link to added frameworks or static
libraries, or that some of these need you to set other C flags or whatever.

Doing so changes the project file, and even though the structure of the project
file has greatly improved over the years, you often end up solving project file
conflicts manually. By moving these settings to explicit xcconfig files and telling
XCode to use these xcconfig files for the build process, your changes never
really messes with the project file, but instead you make changes to these Key-
Value text files."



More on SO: How to change output directory for a target

"This is what I put in an Xcode 6.2 .xcconfig file so intermediate files and
executables go into their "traditional" locations:"

Code:
// Intermediate build files go here
PROJECT_TEMP_DIR = $(SRCROOT)/build/$(PROJECT_NAME).build

// Build-related files for the active build configuration go here
CONFIGURATION_BUILD_DIR = $(SRCROOT)/build/$CONFIGURATION

// The final product executables and other build products go here
BUILT_PRODUCTS_DIR = $(SRCROOT)/build/$CONFIGURATION


Last edited by Ike on Thu Aug 03, 2017 10:52 am; edited 1 time in total
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Wed May 24, 2017 10:34 am    Post subject: Reply with quote

so - How exactly does __attribute__((constructor)) work?

"So, the way the constructors and destructors work is that the shared object
file contains special sections (.ctors and .dtors on ELF) which contain referen-
ces to the functions marked with the constructor and destructor attributes,
respectively. When the library is loaded/unloaded the dynamic loader program
(ld.so or somesuch) checks whether such sections exist, and if so, calls the
functions referenced therein."
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Mon Jun 05, 2017 3:00 pm    Post subject: Reply with quote

git - facebook/xcbuild - Xcode-compatible build tool.

"xcbuild is an Xcode-compatible build tool with the goal of providing faster
builds, better documentation of the build process and running on multiple
platforms (in particular OS X and Linux)"
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Fri Sep 15, 2017 2:45 pm    Post subject: Reply with quote

so - install_name_tool to update a executable to search for dylib in Mac OS X

"This is the command to accomplish the change:

install_name_tool -id "@loader_path/../lib/libtest.dylib" libtest.dylib

Or use rpath:

install_name_tool -id "@rpath/libtest.dylib" libtest.dylib

The binary tries to find the library, it knows where it is located from
install_name_tool -add_rpath "@loader_path/../lib" myapp. It loads the
library, and the library's id is @rpath/libtest.dylib where @rpath is set to
@loader_path/../lib in the executable binary to make the match."
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Mon Nov 06, 2017 8:49 pm    Post subject: Reply with quote

apple.com - What's New in Xcode 9
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Wed Jan 24, 2018 10:31 pm    Post subject: Reply with quote

-Wno-idiomatic-parentheses // if (self = [self init])
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Fri Jun 01, 2018 11:15 am    Post subject: Reply with quote

iOS-factor

"A methodology for building high-quality iOS apps on a solid architecture

I. Dependencies
II. Config
III. Dev/prod parity
IV. Deployment
V. Prefer local over remote
VI. Backwards compatible APIs
VII. App versioning
VIII. Persistence of data"
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Thu Aug 30, 2018 7:13 pm    Post subject: Reply with quote

r - How to configure base SDK vs. deployment target when wanting to support at least iOS 11.0?

"OK, I just found the Unguarded availability compiler flag. It does seem
to throw errors when I use APIs not available in 11.0. Hope I can trust that
thing."
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Mon Sep 17, 2018 10:42 pm    Post subject: Reply with quote

so - Profile doesn't match the entitlements file's value for the application-identifier entitlement

"I am trying to upload an app to the app store and I am getting this error on
the page that has the certs. As far as I can tell I have changed the field so
they have matched, but I am missing something."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Wed Jul 03, 2019 2:24 pm    Post subject: Reply with quote

r - Xcode Build Settings in Depth

More: The Unofficial Guide to xcconfig files - PDF
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Sat Sep 21, 2019 2:01 pm    Post subject: Reply with quote

git - Using iOS 13/13.1 devices with Xcode 10.3 (instead of Xcode 11)

"The trick is to link the DeviceSupport folder from the beta to the stable
version. sudo needed if you run the Mac App Store version. Always download
the dmg instead... you'll thank me later Smile"


Code:
sudo ln -s "/Applications/Xcode.opp/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/13.0" "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/13.0"


Then if it gives you 'dyld_shared_cache_extract_dylibs failed' then creation of an empty file is needed in Xcode cache folder.

> Go to: ~/Library/Developer/Xcode/iOS DeviceSupport/#SDK-VERSION#/Symbols/System/Library/Caches/com.apple.dyld/

touch .processed_dyld_shared_cache_arm64e (or whatever is appropriate)

I created both. Source for the fix: Xcode 4.2: Error 0xC002 when trying to use a jailbroken iPhone 3G for development

In 2022:

so - The code signature version is no longer supported

"If signing through Xcode, you can add this flag to the Other Code Signing
Flags setting in the Build Settings tab."


In 2023:

Use Xcode 14 to run/debug code on iOS 17 or tvOS 17


Last edited by Ike on Sun Oct 29, 2023 11:25 am; edited 5 times in total
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Mon Sep 23, 2019 5:04 pm    Post subject: Reply with quote

allaboutapps.at - Xcode Alternative Icons

"Xcode beta season is over but it's still the time of the year where iOS
developers usually have multiple Xcode version installed. Distinguishing
one from another isn't easy if you have multiple identical icons in the dock
and, like me, getting reminded by Xcode that your project's Swift version
isn't compatible."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Thu Jun 10, 2021 9:04 pm    Post subject: Reply with quote

so - Embedded binary is not signed with the same certificate as the parent app

"Simple way in my case check this screen shot i am done"
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Sat Nov 06, 2021 8:01 am    Post subject: Reply with quote

git - XcodeBenchmark

"XcodeBenchmark is initially created for Max Tech YouTube channel to compare
the performance of new iMacs 2020.

I believe the results will help developers to make the right cost/performance
trade-off decision when choosing their next Mac."
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Tue Nov 23, 2021 8:41 am    Post subject: Reply with quote

r - Is it possible to increment version and build numbers automatically

Code:
#!/bin/sh
# bump_build_number.sh
# Created by buncle on 12/6/12.
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Wed Mar 16, 2022 5:40 pm    Post subject: Reply with quote

r - Why is it so painful to update Xcode?

"Never. install. xcode. through app store
https://medium.com/@marcusziade/xcode-management-with-xcodes-aria2-a715ec2b19

I learnt about xcodes/aria2 solution and it has been a godsend. You can
install/update/switch between Xcode versions within minutes depending on
your internet connection.

...

I recently discovered 'xcodes' and now it's super easy to get the versions I
want: https://github.com/RobotsAndPencils/xcodes
I had the app store xcode until my watch got an update beyond what was
supported and borked a day of work."
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Thu Apr 14, 2022 9:59 am    Post subject: Reply with quote

r - Issues with Mac M1 C library

"New in macOS Big Sur 11.0.1, the system ships with a built-in dynamic linker
cache of all system-provided libraries. As part of this change, copies of dynamic
libraries are no longer present on the filesystem."
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Mon Jul 11, 2022 10:00 am    Post subject: Reply with quote

developer.apple.com - Xcode 10: iPhone has denied the launch request

"Solution 1: open System Prefrences -> Users & Groups -> Add a user account
(build with new user is successfully

Solution 2: open Keychain Access -> choose System, All Items -> delete
certificate Apple Worldwide Developer Relations Certification Authority"


And if adding the key fails:

Code:
security import priv_key.p12 -k ~/Library/Keychains/login.keychain


Last edited by Ike on Tue Jul 12, 2022 8:16 pm; edited 2 times in total
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Tue Jul 12, 2022 3:22 pm    Post subject: Reply with quote

apple - Minimum requirements and supported SDKs

Xcode Version
Minimum OS Required
SDK
Architecture
Deployment
Targets
Simulator
Swift
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Mon May 29, 2023 11:30 am    Post subject: Reply with quote

Creating a Personal Access Token for Xcode

Github Account for Xcode

https://www.en.techgaku.com/configure-github-account-to-xcode/

In my case, I checked the following items.

admin:public_key
write:discussion
repo
user
project


Last edited by Ike on Mon Jul 03, 2023 4:12 pm; edited 1 time in total
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Wed Jun 21, 2023 6:02 pm    Post subject: Reply with quote

so - Preprocessor macro for OS X targets?

Code:
The documentation in TargetConditionals.h has this diagram (it seems, as of 2022; any platform):

+---------------------------------------------------------------------+
|                            TARGET_OS_MAC                            |
| +---+ +-----------------------------------------------+ +---------+ |
| |   | |               TARGET_OS_IPHONE                | |         | |
| |   | | +---------------+ +----+ +-------+ +--------+ | |         | |
| |   | | |      IOS      | |    | |       | |        | | |         | |
| |OSX| | |+-------------+| | TV | | WATCH | | BRIDGE | | |DRIVERKIT| |
| |   | | || MACCATALYST || |    | |       | |        | | |         | |
| |   | | |+-------------+| |    | |       | |        | | |         | |
| |   | | +---------------+ +----+ +-------+ +--------+ | |         | |
| +---+ +-----------------------------------------------+ +---------+ |
+---------------------------------------------------------------------+
This tells us:

TARGET_OS_MAC will be 1 for (probably) any Cocoa application running on an Apple platform.

TARGET_OS_OSX will only be 1 for macOS targets
TARGET_OS_IPHONE will be 1 for any non-Mac Apple products
TARGET_OS_IOS is just for iOS
TARGET_OS_MACCATALYST is just for Project Catalyst. It seems TARGET_OS_UIKITFORMAC will also work.
TARGET_OS_TV is just for tvOS
TARGET_OS_WATCH is just for watchOS
TARGET_OS_BRIDGE is just for bridgeOS (which currently doesn't even support 3rd-party apps so you'll likely always see that be 0)
TARGET_OS_DRIVERKIT will be 1 when building for DriverKit
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Sat Aug 19, 2023 8:13 am    Post subject: Reply with quote

adc - Build settings reference

"Show Diagnostic Output:

Setting name: REZ_SHOW_DEBUG_OUTPUT

Enabling this option causes version and progress information to be written
when compiling resource manager resources."
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Fri Sep 01, 2023 5:34 pm    Post subject: Reply with quote

so - Detect gcc as opposed to msvc / clang with macro

Code:
#if defined(__clang__)
....
#elif defined(__GNUC__) || defined(__GNUG__)
....
#elif defined(_MSC_VER)
....
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Mon Sep 11, 2023 12:59 pm    Post subject: Reply with quote

So, -Wno-unused-but-set-variable did not exist before but if I syncronize
projects with the Github, Xcode will have unrecognized flag warning so
-Wno-unknown-warning-option seems to do the trick

-Wall
-Wno-unused-variable
-Wno-parentheses
-Wno-unused-but-set-variable
-Wno-unknown-warning-option
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Mon Sep 11, 2023 10:39 pm    Post subject: Reply with quote

so - iOS scheme goes missing when I branch my project (Xcode 4.2)

"From my master branch, I exported the schemes I needed - I did by
navigating to Product > Scheme > Manage Schemes... on the Xcode menu.
I then selected the schemes I wanted to export (i.e. Development and
Release in my case). Finally, I chose the Export... option after clicking on
the gear icon as shown in the picture below."
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Thu Sep 14, 2023 9:42 am    Post subject: Reply with quote

adc - Adding package dependencies to your app

"To add a package dependency to your Xcode project, select File > Add
Package Dependency and enter its repository URL. You can also navigate
to your target's General pane, and in the 'Frameworks, Libraries, and
Embedded Content' section, click the + button, select Add Other, and
choose Add Package Dependency."
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Thu Feb 22, 2024 3:22 pm    Post subject: Reply with quote

apple - Both ios-x86_64-simulator and ios-arm64-simulator represent two equivalent library definitions. XCFramework for iOS simulator on M1 & Intel Mac? How?

"You should never use lipo to merge, say, an arm64 iOS slice with an x86_64
iOS Simulator slice, because those slices are for different platforms. However,
using lipo to merge an arm64 iOS Simulator slice (for the simulator running
on an Apple silicon Mac) with an x86_64 iOS Simulator slice (for the simulator
running on an Intel Mac) is standard operational procedure."
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Thu Feb 29, 2024 8:54 pm    Post subject: Reply with quote

Apple - Configuring a Project for SDK-Based Development

"You can use features from system versions later than the deployment target,
up to and including the OS version you've selected as your base SDK,
but you must check for the availability of new features, as described in Using
Weakly Linked Classes in iOS and Using Weakly Linked Methods and Functions.

For possible values and more information about build settings in Xcode, see
Building for Multiple Releases of an Operating System in Xcode Project
Management Guide, Xcode Build System Guide and Running Applications in iOS"
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Wed Mar 27, 2024 8:11 pm    Post subject: Reply with quote

r - WORKAROUND: Slow debugging with Xcode 15 + iOS 17

1. Disconnect iPhone from USB cable if already connected
2. Put iPhone in airplane mode
3. Connect to USB cable and wait for Xcode to finish connecting to it
4. Take iPhone out of airplane mode
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Wed Aug 07, 2024 3:39 pm    Post subject: Reply with quote

so - CGContext invalid context 0x0

"Try this: In xcode add symbolic breakpoint to CGPostError. (Add symbolic
breakpoint, and to Symbol field type CGPostError)"
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3156
Location: Europe

PostPosted: Fri Nov 29, 2024 10:26 am    Post subject: Reply with quote

so - Sandboxing issue in Xcode Run Script Phase

"Check your project build settings:

'User Script Sandboxing' - if it is set to Yes, change it to No."
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Igor Delovski Board Forum Index -> Mac Cocoa All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Delovski.hr
Powered by php-B.B. © 2001, 2005 php-B.B. Group