How to reference classes from another project [duplicate] - dart

This question already has answers here:
How to reference another file in Dart?
(4 answers)
Dart - How does one dart project import code from another dart project without using pub?
(1 answer)
Closed 8 years ago.
I'm trying to share objects between a client-side and server-side project. Currently the way I thought of doing it was by adding a 3rd project called "shared" and put my common classes inside.
But now when I run my client-side-project by referencing files like this:
import '../../../shared/game.dart';
I get a warning from pub saying
[Error from InjectorGenerator on
client|web/main.dart]: Could not load asset
client|../shared/game.dart
Is there a way to either publish locally my shared project to reference the classes with the import packages:... syntax? Otherwise, what's the way of doing this in Dart?

Related

Different AppDelegate and Storyboard files for different targets [duplicate]

This question already has answers here:
How do I manage building a Lite vs Paid version of an iPhone app?
(6 answers)
Closed 4 years ago.
I have an XCode Project(iOS App for only iPhones) and I want to use same codebase for publishing different application. I have to change icon, name and design for this second application. Therefore, I did not use Localization.
Also in codebase, I need some variables to hold different keywords for different targets.
Is there any way to do it or I have to clone same project and change this files after?
Thanks.
Take a look at this question.
StackOverFlow Question
You will have to convert the code to swift but this gives you the basics to get started.
One workspace, two app targets, one set of code files.
Alternatively, use a framework. In that case it might be one workspace and two complete Xcode projects plus the framework.

Finding incompatible Objective-C category definitions from compiler warning after Swift 3 migration [duplicate]

This question already has answers here:
Xcode 8 Objective-C category warning
(8 answers)
Closed 3 years ago.
After migrating to Swift 3 compiler gives me a warning:
Some object files have incompatible Objective-C category definitions.
Some category metadata may be lost. All files containing Objective-C
categories should be built using the same compiler.
Does anyone know how can I find objects or files defined as some object files from the warning?
I have zillions of extensions and going through all of them would be a madness. Is there an easier way?
I know there are similar questions but no one asks how to find the files/objects responsible for the warning.
If you click on the warning, you will see the area in the build log where probably some library will be named.

Why can't we access Apple's implementation files? [duplicate]

This question already has answers here:
Where is the source code for NSObject.m? [closed]
(3 answers)
Closed 6 years ago.
I am learning about Objective-C runtime. I can access to NSObject.m root class to see how it works but I can not acces to NSProxy.m or UITableView.m files.
Why does Apple enable access to some implementation files and others not?
I've searched in Google but I haven't found anything.
Actually, you don't have access to any of Apple's Cocoa source code. It's secret.
You may have found online some open source version of NSObject (for the Darwin project or OpenStep / GNUStep or similar), but that is not Apple's Cocoa source code.
Apple may choose to provide an open source version of some of their code, e.g. http://www.opensource.apple.com/. But even then you don't really know what they are using under the hood.

How to convert c program to fully portable for ios [duplicate]

This question already has answers here:
Using LDAP for authentication in iOS
(2 answers)
Closed 7 years ago.
I wrote a simple c program for connect to ldap server using opelLdap c library.
now I want to run that c program on ios device. but when I move that c program to xcode project it says ldap.h is missing. ldap.h file is saved in standard include file location so it include this way #include <ldap.h> but I move this file to my xcode project and include it this way #include "ldap.h" it generate so many error because this ldap.h header file contain lot of other standard header files and they have their own dependencies and so on. they all are include this way #include <header.h> it is not possible to convert all the <> to " " one by one.
is there any way to to this thing. actually I need to move my code with it's all dependencies
I am new to both of this c and xcode(swift/objective-c)
If you want to have #include <something> work, you could add path to that files into path search list in Build Settings -> Search Paths -> Header Search Paths.
It can be done by specifying the -I<directory> - it is compile flag or the other option is to set the patch in xcode setting. Third option is to use build variables.
check this out - How to tell Xcode how to include a library specified with angle brackets?

How to hide code in implimentation file in iOS [duplicate]

This question already has answers here:
How to build a framework or library for other developers, the secure way? [closed]
(3 answers)
Closed 8 years ago.
I have a developed a generic class and I want to give it to one of my friend.
How can I hide the code so that he should not view the logic in that. Can I do something like apple does by giving us only the .h files.
Please help me in achieving this. Thanks.
you need to create your own static library i.e. .a file in xcode. And it is not very tough, you can do this in just in few mins.
Read this tutorial and try in out:
How to make Universal Static library (.a file) in iOs using xCode
You will have to make your own library (framework) for this.
You can search about it there are many tutorials about that. One of them is How to build a framework or library for other developers, the secure way?
Edit: Great Tutorial
Creating Static Libraries For iOS

Resources