-------------------------------------------------------
Objective-C declared @property attributes (nonatomic, copy, strong, weak)
Nonatomic
nonatomic is used for multi threading purposes. If we have set the nonatomic attribute at the time of declaration, then any other thread wanting access to that object can access it and give results in respect to multi-threading.
Copy
copy is required when the object is mutable. Use this if you need the value of the object as it is at this moment, and you don't want that value to reflect any changes made by other owners of the object. You will need to release the object when you are finished with it because you are retaining the copy.
Assign
Assign is somewhat the opposite to copy. When calling the getter of an assign property, it returns a reference to the actual data. Typically you use this attribute when you have a property of primitive type (float, int, BOOL...)
Retain
retain is required when the attribute is a pointer to an object. The setter generated by @synthesize will retain (aka add a retain count to) the object. You will need to release the object when you are finished with it. By using retain it will increase the retain count and occupy memory in autorelease pool.
Strong
strong is a replacement for the retain attribute, as part of Objective-C Automated Reference Counting (ARC). In non-ARC code it's just a synonym for retain.
Weak
weak is similar to strong except that it won't increase the reference count by 1. It does not become an owner of that object but just holds a reference to it. If the object's reference count drops to 0, even though you may still be pointing to it here, it will be deallocated from memory.
-------------------------------------------------------
If you ever got this question
"how can I fix xCode compiling everything all the time?"Answer is :
You should execute following bash command in your project main folder.
-> find . -exec touch {} \;
This worked, at least for me :)
-------------------------------------------------------
Model-View-Controller
Model-View-Controller
Short Description about MVC
- Model : An object that stores data in a structured way. Core Data lets you create
data models to interface with stored data. You can also create custom classes to
represent objects, such as a vehicle class, which might have a type property, a
wheels property, a make property, and many more.
- View : The view
should be all the visual elements of an application, held in isolation from any code.
- Controller : The part that manages the views and the models. It acts as an
intermediary between the two, taking information from the model and using it to
coordinate changes in the view.
-------------------------------------------------------
BitCode
Short Description about BitCode
What is bitcode ?
- Bitcode is an intermediate representation of a compiled program. Apps you upload to iTunes Connect that contain bitcode will be compiled and linked on the App Store. Including bitcode will allow Apple to re-optimize your app binary in the future without the need to submit a new version of your app to the store.
- Bitcode allows other App Thinning component called Slicing to generate app bundle variants with particular executables for particular architectures, e.g. iPhone 5S variant will include only arm64 executable, iPad Mini armv7 and so on
- When you archive for submission to the App Store, Xcode will compile your app into an intermediate representation. The App Store will then compile the bitcode down into the 64 or 32 bit executables as necessary.
- For iOS apps, bitcode is the default, but optional. If you provide bitcode, all apps and frameworks in the app bundle need to include bitcode.
What happens to the binary when ENABLE_BITCODE is enabled in the new Xcode?
- Activating this setting indicates that the target or project should generate bitcode during compilation for platforms and architectures which support it. For Archive builds, bitcode will be generated in the linked binary for submission to the app store. For other builds, the compiler and linker will check whether the code complies with the requirements for bitcode generation, but will not generate actual bitcode.

No comments:
Post a Comment